Skip to main content

Module outbox

Module outbox 

Source
Expand description

Transport-agnostic send handle to a remote ma service.

An Outbox wraps the transport details and exposes only send() + close(). Created via crate::iroh::IrohEndpoint::outbox.

send() takes a Message, validates it, serializes to CBOR, and transmits. Malformed or expired messages are rejected before anything hits the wire.

Requires the iroh feature.

let mut outbox = ep.outbox("did:ma:456", "ma/presence/0.0.1").await?;
outbox.send(&message).await?;
outbox.close();

Structs§

Outbox
A transport-agnostic write handle to a remote service.