#[non_exhaustive]pub struct RestateSendOptions {
pub invocation_mode: Option<InvocationMode>,
pub delay: Option<Duration>,
}Expand description
Restate-specific options for a single send attempt.
This is the one typed value inserted into
email_transport::SendOptions::transport_options for Restate. It travels
under the provider key "restate" and overrides the defaults configured on
the caller-side RestateTransport for one send.
The slot is forwarded to the worker in the queued payload like every other provider slice. Workers ignore it unless their transport registry itself contains a Restate-backed transport, in which case the same mode and delay apply to the second hop as well.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.invocation_mode: Option<InvocationMode>Override the transport’s configured InvocationMode for this send.
delay: Option<Duration>Delay before Restate starts the worker invocation.
Sent as the ingress delay query parameter, encoded as whole
milliseconds rounded up. Only valid with InvocationMode::Queued;
combining it with InvocationMode::Sent fails the send with
ErrorKind::Validation before any request is made.
This is provider scheduling behavior, not a delivery constraint: a
transport that does not recognize the restate slot delivers now
rather than later.
Implementations§
Source§impl RestateSendOptions
impl RestateSendOptions
Sourcepub const fn with_invocation_mode(self, invocation_mode: InvocationMode) -> Self
pub const fn with_invocation_mode(self, invocation_mode: InvocationMode) -> Self
Override the invocation mode for this send.
Sourcepub const fn with_delay(self, delay: Duration) -> Self
pub const fn with_delay(self, delay: Duration) -> Self
Delay the worker invocation by delay.
Trait Implementations§
Source§impl Clone for RestateSendOptions
impl Clone for RestateSendOptions
Source§fn clone(&self) -> RestateSendOptions
fn clone(&self) -> RestateSendOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RestateSendOptions
impl Debug for RestateSendOptions
Source§impl Default for RestateSendOptions
impl Default for RestateSendOptions
Source§fn default() -> RestateSendOptions
fn default() -> RestateSendOptions
Source§impl<'de> Deserialize<'de> for RestateSendOptions
impl<'de> Deserialize<'de> for RestateSendOptions
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>,
impl Eq for RestateSendOptions
Source§impl PartialEq for RestateSendOptions
impl PartialEq for RestateSendOptions
Source§impl Serialize for RestateSendOptions
impl Serialize for RestateSendOptions
impl StructuralPartialEq for RestateSendOptions
Source§impl TransportOption for RestateSendOptions
impl TransportOption for RestateSendOptions
Source§fn provider_key() -> &'static str
fn provider_key() -> &'static str
Auto Trait Implementations§
impl Freeze for RestateSendOptions
impl RefUnwindSafe for RestateSendOptions
impl Send for RestateSendOptions
impl Sync for RestateSendOptions
impl Unpin for RestateSendOptions
impl UnsafeUnpin for RestateSendOptions
impl UnwindSafe for RestateSendOptions
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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