pub struct SendRequest {
pub to: Address,
pub subject: String,
pub body: String,
pub reply_to: Option<MessageId>,
pub correlation: Option<String>,
pub refs: Vec<MessageRef>,
pub idempotency_key: Option<String>,
}Expand description
Requests a send. Has no from field and must never grow one. The
sender is whoever the presented credential authenticated as; the
mailbox derives from from the verified identity, never from a field
the caller filled in.
Fields§
§to: Address§subject: String§body: String§reply_to: Option<MessageId>§correlation: Option<String>§refs: Vec<MessageRef>§idempotency_key: Option<String>Scopes a retry: a repeat SendRequest from the same participant
carrying the same key returns the original SendResponse and
creates nothing (mail4agent-core’s MailboxEngine::send).
Optional and defaulted on decode so a payload written before this
field existed still deserializes.
Without a key, a repeat send is a second message, and that is correct – sending the same text twice on purpose should produce two messages. This field opts a caller into dedup; it is never inferred from content.
Implementations§
Trait Implementations§
Source§impl Clone for SendRequest
impl Clone for SendRequest
Source§impl Debug for SendRequest
impl Debug for SendRequest
Source§impl<'de> Deserialize<'de> for SendRequest
impl<'de> Deserialize<'de> for SendRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SendRequest
Source§impl PartialEq for SendRequest
impl PartialEq for SendRequest
Source§impl Serialize for SendRequest
impl Serialize for SendRequest
impl StructuralPartialEq for SendRequest
Auto Trait Implementations§
impl Freeze for SendRequest
impl RefUnwindSafe for SendRequest
impl Send for SendRequest
impl Sync for SendRequest
impl Unpin for SendRequest
impl UnsafeUnpin for SendRequest
impl UnwindSafe for SendRequest
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