#[non_exhaustive]pub struct TriggerDeferral {
pub payload: String,
pub delay: Option<Duration>,
}Expand description
Deferral marker returned by TriggerOutcome::Defer.
Carries an implementation-defined payload plus an optional
delay (FU-5). When delay is None the deferred item re-fires
on the next scheduler tick (legacy “any moment now” semantics);
when Some(d) the host’s deferral queue waits at least d before
re-invoking the trigger.
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.payload: StringImplementation-defined payload — opaque to the host. Persisted
across Uni restarts when the host’s durable defer queue is
enabled.
delay: Option<Duration>Wait at least this duration before re-firing. None means “as
soon as the next tick fires” (~50–100 ms).
Implementations§
Source§impl TriggerDeferral
impl TriggerDeferral
Sourcepub fn from_payload(payload: impl Into<String>) -> Self
pub fn from_payload(payload: impl Into<String>) -> Self
Construct a deferral with no delay.
Use this when the trigger is simply asking “re-queue me for the next tick” — e.g., when an external prerequisite resource might become available at any moment.
Sourcepub fn after(payload: impl Into<String>, delay: Duration) -> Self
pub fn after(payload: impl Into<String>, delay: Duration) -> Self
Construct a deferral with an explicit delay.
The host’s deferral queue waits at least delay before
re-invoking TriggerPlugin::on_deferred (or, when the host
has not adopted the on_deferred callback, TriggerPlugin::fire
with the original MutationBatch).
Trait Implementations§
Source§impl Clone for TriggerDeferral
impl Clone for TriggerDeferral
Source§fn clone(&self) -> TriggerDeferral
fn clone(&self) -> TriggerDeferral
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TriggerDeferral
impl RefUnwindSafe for TriggerDeferral
impl Send for TriggerDeferral
impl Sync for TriggerDeferral
impl Unpin for TriggerDeferral
impl UnsafeUnpin for TriggerDeferral
impl UnwindSafe for TriggerDeferral
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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