pub struct ModelAttemptHandoff { /* private fields */ }Expand description
Retained model-attempt handoff safe to retry before physical dispatch.
Implementations§
Source§impl ModelAttemptHandoff
impl ModelAttemptHandoff
Sourcepub fn new(
fence: RunFence,
invocation: ModelInvocation,
attempt_id: AttemptId,
events: InvocationAttemptEventIds,
cancellation: CancellationSignal,
stream_sink: Option<Arc<dyn ModelEventSink>>,
) -> Result<Self, InvocationAttemptHandoffError>
pub fn new( fence: RunFence, invocation: ModelInvocation, attempt_id: AttemptId, events: InvocationAttemptEventIds, cancellation: CancellationSignal, stream_sink: Option<Arc<dyn ModelEventSink>>, ) -> Result<Self, InvocationAttemptHandoffError>
Constructs and scope-checks one model attempt handoff.
A streaming request requires a durable event sink; a complete request rejects one so event-delivery configuration cannot be silently ignored.
§Errors
Rejects crossed scope, a non-startable invocation state, or an invalid response-mode/sink pairing.
Sourcepub const fn invocation(&self) -> &ModelInvocation
pub const fn invocation(&self) -> &ModelInvocation
Returns the prepared or safely retryable durable invocation revision.
Sourcepub const fn attempt_id(&self) -> AttemptId
pub const fn attempt_id(&self) -> AttemptId
Returns the proposed unique physical provider attempt.
Sourcepub const fn events(&self) -> InvocationAttemptEventIds
pub const fn events(&self) -> InvocationAttemptEventIds
Returns stable start/terminal journal identities.
Trait Implementations§
Source§impl Clone for ModelAttemptHandoff
impl Clone for ModelAttemptHandoff
Auto Trait Implementations§
impl !RefUnwindSafe for ModelAttemptHandoff
impl !UnwindSafe for ModelAttemptHandoff
impl Forget for ModelAttemptHandoff
impl Freeze for ModelAttemptHandoff
impl Move for ModelAttemptHandoff
impl Send for ModelAttemptHandoff
impl Sync for ModelAttemptHandoff
impl Unpin for ModelAttemptHandoff
impl UnsafeUnpin for ModelAttemptHandoff
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
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> ⓘ
Converts
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> ⓘ
Converts
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