pub enum BearerMethod {
Header,
}Expand description
How a bearer token reaches the server.
RFC 9728 §2: bearer_methods_supported names the mechanisms this resource
accepts. Only the header mechanism is defined by the RFC, and it is the
only one this crate reads a token from — the alternative in the spec’s
discussion is the Authorization request body parameter, which MCP’s
transports have no place for.
Variants§
Header
RFC 6750 §2.1, the Authorization: Bearer header.
The wire spelling is lower case because that is what the RFC’s
bearer_methods_supported array contains and what a client’s parser
compares against.
Implementations§
Trait Implementations§
Source§impl Clone for BearerMethod
impl Clone for BearerMethod
impl Copy for BearerMethod
Source§impl Debug for BearerMethod
impl Debug for BearerMethod
Source§impl Default for BearerMethod
impl Default for BearerMethod
impl Eq for BearerMethod
Source§impl Hash for BearerMethod
impl Hash for BearerMethod
Source§impl Ord for BearerMethod
impl Ord for BearerMethod
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for BearerMethod
impl PartialEq for BearerMethod
Source§impl PartialOrd for BearerMethod
impl PartialOrd for BearerMethod
Source§impl Serialize for BearerMethod
impl Serialize for BearerMethod
impl StructuralPartialEq for BearerMethod
Auto Trait Implementations§
impl Freeze for BearerMethod
impl RefUnwindSafe for BearerMethod
impl Send for BearerMethod
impl Sync for BearerMethod
impl Unpin for BearerMethod
impl UnsafeUnpin for BearerMethod
impl UnwindSafe for BearerMethod
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