pub struct SendContext<'a> {
pub send_id: Option<&'a str>,
pub tenant: Option<&'a str>,
}Expand description
The per-dispatch context a send carries beyond the
sender and the request: the correlation send-id and the tenant scope.
The send_id is the host’s per-dispatch idempotency token (see
idempotency_token); the transport
uses it two ways — as the VERP bounces+<send-id>@… Return-Path that
correlates an inbound bounce/challenge/reply back to this send, and as an
exactly-once key so a durable retry of an already-sent dispatch does not
double-send. The tenant scopes the send-status and suppression rows the
transport reads/writes. Both are Option because a zero-config deployment (no
HMAC secret, no tenant) sends without correlation or tenant scoping.
A named struct rather than positional Option<&str> parameters: send_id and
tenant are both optional strings and would be trivially transposable at the
call site.
Fields§
§send_id: Option<&'a str>The per-dispatch VERP send-id / exactly-once key. None → the transport
sends with no VERP Return-Path and no exactly-once dedup.
tenant: Option<&'a str>The tenant the send is scoped to (RLS stamp on send-status / suppression
rows). None → single-tenant.
Trait Implementations§
Source§impl<'a> Clone for SendContext<'a>
impl<'a> Clone for SendContext<'a>
Source§fn clone(&self) -> SendContext<'a>
fn clone(&self) -> SendContext<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for SendContext<'a>
Source§impl<'a> Debug for SendContext<'a>
impl<'a> Debug for SendContext<'a>
Source§impl<'a> Default for SendContext<'a>
impl<'a> Default for SendContext<'a>
Source§fn default() -> SendContext<'a>
fn default() -> SendContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for SendContext<'a>
impl<'a> RefUnwindSafe for SendContext<'a>
impl<'a> Send for SendContext<'a>
impl<'a> Sync for SendContext<'a>
impl<'a> Unpin for SendContext<'a>
impl<'a> UnsafeUnpin for SendContext<'a>
impl<'a> UnwindSafe for SendContext<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more