pub struct RequestContext<R: ServiceRole> {
pub ct: CancellationToken,
pub id: RequestId,
pub meta: Meta,
pub extensions: Extensions,
pub peer: Peer<R>,
}Available on crate features
client or server only.Expand description
Request execution context
Fields§
§ct: CancellationTokenthis token will be cancelled when the CancelledNotification is received.
id: RequestId§meta: Meta§extensions: Extensions§peer: Peer<R>An interface to fetch the remote client or server
Trait Implementations§
Source§impl<R: Clone + ServiceRole> Clone for RequestContext<R>
impl<R: Clone + ServiceRole> Clone for RequestContext<R>
Source§fn clone(&self) -> RequestContext<R>
fn clone(&self) -> RequestContext<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<R: Debug + ServiceRole> Debug for RequestContext<R>
impl<R: Debug + ServiceRole> Debug for RequestContext<R>
Source§impl<C> FromContextPart<C> for RequestContext<RoleServer>where
C: AsRequestContext,
Available on crate feature server only.Common extractors that can be used by both tool and prompt handlers
impl<C> FromContextPart<C> for RequestContext<RoleServer>where
C: AsRequestContext,
Available on crate feature
server only.Common extractors that can be used by both tool and prompt handlers
Auto Trait Implementations§
impl<R> Freeze for RequestContext<R>
impl<R> !RefUnwindSafe for RequestContext<R>
impl<R> Send for RequestContext<R>
impl<R> Sync for RequestContext<R>
impl<R> Unpin for RequestContext<R>
impl<R> !UnwindSafe for RequestContext<R>
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