Struct McpSessionId Copy item path Source pub struct McpSessionId();Expand description The Mcp-Session-Id header value naming one session.
Copy, because the only field is a SessionId , which is Copy. It is
therefore a plain u64 on the wire path, which is the point: this sits in
the per-request state and is compared against on every request.
The wire id for an internal session.
Infallible, and it is infallible by construction rather than by trusting
the caller: the rendering is a fixed 16-digit hex expansion of a u64,
every one of which is inside VISIBLE_ASCII_RANGE .
The internal session this header names.
The inverse of new , and total: every id this type can
hold has a session, because the id is a session.
The value as bytes, for an adapter filling in a header.
Takes a buffer rather than returning a String because the alternative
allocates once per response and this is on every one of them. The buffer
only has to outlive the borrow it returns.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Formats the value using the given formatter.
Read more Converts to this type from the input type.
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string
s to return a value of this type.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more 🔬 This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range.
Read more This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Converts to this type from a reference to the input type.
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more Converts the given value to a
String.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.