pub struct StatelessRequest {
pub version: Option<ProtocolVersion>,
pub client_caps: CapabilitySet,
pub client_info: Option<PeerInfo>,
pub server_info: Option<PeerInfo>,
}Expand description
What a stateless 2026-07-28 request said about itself.
Fields§
§version: Option<ProtocolVersion>io.modelcontextprotocol/protocolVersion from the request’s _meta.
client_caps: CapabilitySetThe capabilities the client advertised in _meta.
client_info: Option<PeerInfo>The client identity from io.modelcontextprotocol/clientInfo.
server_info: Option<PeerInfo>The server identity to stamp into each result’s _meta.
Implementations§
Source§impl StatelessRequest
impl StatelessRequest
Sourcepub const fn with_version(self, version: ProtocolVersion) -> Self
pub const fn with_version(self, version: ProtocolVersion) -> Self
The version the request advertised in its _meta.
A request whose _meta carried no version leaves this unset, and
the server picks the revision to answer on.
Sourcepub const fn with_client_caps(self, caps: CapabilitySet) -> Self
pub const fn with_client_caps(self, caps: CapabilitySet) -> Self
Replaces the advertised capability set rather than merging into it. A request that advertised none carries an empty set.
Trait Implementations§
Source§impl Clone for StatelessRequest
impl Clone for StatelessRequest
Source§impl Debug for StatelessRequest
impl Debug for StatelessRequest
Source§impl Default for StatelessRequest
impl Default for StatelessRequest
impl Eq for StatelessRequest
Source§impl PartialEq for StatelessRequest
impl PartialEq for StatelessRequest
impl StructuralPartialEq for StatelessRequest
Auto Trait Implementations§
impl Freeze for StatelessRequest
impl RefUnwindSafe for StatelessRequest
impl Send for StatelessRequest
impl Sync for StatelessRequest
impl Unpin for StatelessRequest
impl UnsafeUnpin for StatelessRequest
impl UnwindSafe for StatelessRequest
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