pub struct BridgeClosedError;
Expand description
Occurs when you try to send or receive a message through the bridge after it has been closed.
§Examples
use node_bridge::{NodeBridge, BridgeClosedError};
#[tokio::main]
async fn main() {
let bridge = NodeBridge::new();
bridge.close().await;
assert_eq!(bridge.receive("channel_foo").await, Err(BridgeClosedError));
assert_eq!(bridge.send("channel_foo", "bar"), Err(BridgeClosedError));
}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BridgeClosedError
impl RefUnwindSafe for BridgeClosedError
impl Send for BridgeClosedError
impl Sync for BridgeClosedError
impl Unpin for BridgeClosedError
impl UnwindSafe for BridgeClosedError
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