pub struct HttpBridge { /* private fields */ }Expand description
HTTP Bridge implementation
Implementations§
Source§impl HttpBridge
impl HttpBridge
Sourcepub fn new(http_config: HttpBridgeConfig) -> Self
pub fn new(http_config: HttpBridgeConfig) -> Self
Create a new HTTP bridge
Sourcepub fn update_signal(&self, address: &str, value: Value)
pub fn update_signal(&self, address: &str, value: Value)
Update local signal cache (called when receiving messages from CLASP)
Trait Implementations§
Source§impl Bridge for HttpBridge
impl Bridge for HttpBridge
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 HttpBridge
impl !RefUnwindSafe for HttpBridge
impl Send for HttpBridge
impl Sync for HttpBridge
impl Unpin for HttpBridge
impl UnsafeUnpin for HttpBridge
impl !UnwindSafe for HttpBridge
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