pub struct ModelInvocation {
pub request: ModelRequest,
pub ctx: ExecutionContext,
}Expand description
One model call’s full request + request-scope context. Layers read both fields; the leaf service consumes them.
Fields§
§request: ModelRequestProvider-neutral model request the codec will encode.
ctx: ExecutionContextRequest-scope state (cancellation, deadline, tenant, thread).
Implementations§
Source§impl ModelInvocation
impl ModelInvocation
Sourcepub const fn new(request: ModelRequest, ctx: ExecutionContext) -> Self
pub const fn new(request: ModelRequest, ctx: ExecutionContext) -> Self
Bundle request + ctx into one invocation.
Trait Implementations§
Source§impl Clone for ModelInvocation
impl Clone for ModelInvocation
Source§fn clone(&self) -> ModelInvocation
fn clone(&self) -> ModelInvocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelInvocation
impl Debug for ModelInvocation
Source§impl From<ModelInvocation> for StreamingModelInvocation
impl From<ModelInvocation> for StreamingModelInvocation
Source§fn from(inner: ModelInvocation) -> Self
fn from(inner: ModelInvocation) -> Self
Converts to this type from the input type.
Source§impl Retryable for ModelInvocation
impl Retryable for ModelInvocation
Source§fn ctx(&self) -> &ExecutionContext
fn ctx(&self) -> &ExecutionContext
Borrow the
ExecutionContext
the retry loop checks for cancellation between attempts.Source§fn ctx_mut(&mut self) -> &mut ExecutionContext
fn ctx_mut(&mut self) -> &mut ExecutionContext
Mutable handle so
RetryService can stamp an idempotency
key on first entry — every clone of the request that follows
shares the stamped key, so vendor-side dedupe sees one
logical call across N attempts.Auto Trait Implementations§
impl Freeze for ModelInvocation
impl !RefUnwindSafe for ModelInvocation
impl Send for ModelInvocation
impl Sync for ModelInvocation
impl Unpin for ModelInvocation
impl UnsafeUnpin for ModelInvocation
impl !UnwindSafe for ModelInvocation
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