pub struct WebSocketBridge { /* private fields */ }Expand description
WebSocket Bridge implementation
Implementations§
Source§impl WebSocketBridge
impl WebSocketBridge
Sourcepub fn new(ws_config: WebSocketBridgeConfig) -> Self
pub fn new(ws_config: WebSocketBridgeConfig) -> Self
Create a new WebSocket bridge
Trait Implementations§
Source§impl Bridge for WebSocketBridge
impl Bridge for WebSocketBridge
Source§fn config(&self) -> &BridgeConfig
fn config(&self) -> &BridgeConfig
Get the bridge configuration
Source§fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<BridgeEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<BridgeEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the bridge
Source§fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the bridge
Source§fn send<'life0, 'async_trait>(
&'life0 self,
msg: Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
msg: Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a message from Clasp to the bridged protocol
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Check if the bridge is running
Auto Trait Implementations§
impl Freeze for WebSocketBridge
impl !RefUnwindSafe for WebSocketBridge
impl Send for WebSocketBridge
impl Sync for WebSocketBridge
impl Unpin for WebSocketBridge
impl UnsafeUnpin for WebSocketBridge
impl !UnwindSafe for WebSocketBridge
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