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 Forget for Outbox
impl Freeze for Outboxwhere
*const dyn OutboxWire is !null: Freeze,
PhantomData<dyn OutboxWire>: Freeze,
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<VerificationMethod>: Freeze,
PhantomData<Ipld>: Freeze,
*const LeafNode<String, Ipld> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Ipld)>>: Freeze,
impl Move for Outbox
impl Send for Outbox
impl Unpin for Outbox
impl UnsafeUnpin for Outboxwhere
*const dyn OutboxWire is !null: UnsafeUnpin,
PhantomData<dyn OutboxWire>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<VerificationMethod>: UnsafeUnpin,
PhantomData<Ipld>: UnsafeUnpin,
*const LeafNode<String, Ipld> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Ipld)>>: UnsafeUnpin,
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