Skip to main content

build_inbound

Function build_inbound 

Source
pub fn build_inbound(
    from: &str,
    to: &str,
    subject: &str,
    size: usize,
    sender_verified: bool,
    sender_did: Option<String>,
) -> InboundMessage
Expand description

Construct an InboundMessage envelope for the rules engine.

This is pure: it only populates the struct from its arguments — no I/O, no clock. It is the single place both real IMAP delivery and tests build the envelope the rules engine consumes, so the mapping from wire data to the rules’ view lives in exactly one spot.