Struct LiveRouter
pub struct LiveRouter { /* private fields */ }Expand description
Client router for the REST API live data endpoints.
Implementations§
§impl LiveRouter
impl LiveRouter
pub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Returns true if the websocket connection is open.
pub fn connect(&mut self) -> Result<()>
pub fn connect(&mut self) -> Result<()>
Opens the websocket connection.
The router timeout bounds the entire connection process: the TCP
connect phase uses it as a connect timeout, and it is applied as the
socket read and write timeout before the TLS and WebSocket handshake.
This ensures a stalled or hanging host cannot block for longer than
timeout_s, and that live operations afterwards cannot block
indefinitely if the server stalls.
pub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Closes the websocket connection (no-op if not connected).
pub fn set_data(
&mut self,
data: IndexMap<String, InstructionValue>,
) -> Result<()>
pub fn set_data( &mut self, data: IndexMap<String, InstructionValue>, ) -> Result<()>
Sets data via the websocket connection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveRouter
impl !RefUnwindSafe for LiveRouter
impl Send for LiveRouter
impl Sync for LiveRouter
impl Unpin for LiveRouter
impl !UnwindSafe for LiveRouter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more