pub struct Outbox { /* private fields */ }Expand description
A transport-agnostic write handle to a remote service.
The caller doesn’t need to know the underlying transport.
Implementations§
Source§impl Outbox
impl Outbox
Sourcepub async fn send(&mut self, message: &Message) -> Result<()>
pub async fn send(&mut self, message: &Message) -> Result<()>
Send a ma message to the remote service.
Validates the message headers, encrypts non-broadcast remote messages, and transmits the resulting CBOR payload.
Loopback (self-addressed) delivery is never encrypted: it is handed
straight to a local Inbox where the same endpoint would
only decrypt it again, and the reader verifies the signature regardless.
§Errors
Returns an error if validation, serialization, or transport send fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Outbox
impl !Sync for Outbox
impl !UnwindSafe for Outbox
impl Freeze for Outbox
impl Send for Outbox
impl Unpin for Outbox
impl UnsafeUnpin for Outbox
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