pub trait FromContextPart<C>: Sized {
// Required method
fn from_context_part(context: &mut C) -> Result<Self, ErrorData>;
}Available on crate feature
server only.Expand description
Trait for extracting parts from a context, unifying tool and prompt extraction
Required Methods§
fn from_context_part(context: &mut C) -> Result<Self, ErrorData>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<C> FromContextPart<C> for CancellationTokenwhere
C: AsRequestContext,
impl<C> FromContextPart<C> for CancellationTokenwhere
C: AsRequestContext,
Implementors§
impl<C> FromContextPart<C> for Extensionswhere
C: AsRequestContext,
impl<C> FromContextPart<C> for Metawhere
C: AsRequestContext,
impl<C> FromContextPart<C> for Peer<RoleServer>where
C: AsRequestContext,
impl<C> FromContextPart<C> for RequestContext<RoleServer>where
C: AsRequestContext,
Common extractors that can be used by both tool and prompt handlers