pub enum AuthResolution {
Provided {
request: AuthRequest,
credentials: MetadataMap,
},
Cancelled {
request: AuthRequest,
},
}Expand description
Outcome of an AuthRequest after the host’s McpAuthResponder runs.
Variants§
Provided
The host obtained credentials.
Cancelled
The host cancelled the auth flow.
Fields
§
request: AuthRequestImplementations§
Source§impl AuthResolution
impl AuthResolution
Sourcepub fn provided(request: AuthRequest, credentials: MetadataMap) -> Self
pub fn provided(request: AuthRequest, credentials: MetadataMap) -> Self
Builds a successful auth resolution.
Sourcepub fn cancelled(request: AuthRequest) -> Self
pub fn cancelled(request: AuthRequest) -> Self
Builds a cancelled auth resolution.
Sourcepub fn request(&self) -> &AuthRequest
pub fn request(&self) -> &AuthRequest
Returns the underlying AuthRequest regardless of variant.
Trait Implementations§
Source§impl Clone for AuthResolution
impl Clone for AuthResolution
Source§fn clone(&self) -> AuthResolution
fn clone(&self) -> AuthResolution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthResolution
impl Debug for AuthResolution
Source§impl<'de> Deserialize<'de> for AuthResolution
impl<'de> Deserialize<'de> for AuthResolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AuthResolution
Source§impl PartialEq for AuthResolution
impl PartialEq for AuthResolution
Source§fn eq(&self, other: &AuthResolution) -> bool
fn eq(&self, other: &AuthResolution) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AuthResolution
impl Serialize for AuthResolution
impl StructuralPartialEq for AuthResolution
Auto Trait Implementations§
impl Freeze for AuthResolution
impl RefUnwindSafe for AuthResolution
impl Send for AuthResolution
impl Sync for AuthResolution
impl Unpin for AuthResolution
impl UnsafeUnpin for AuthResolution
impl UnwindSafe for AuthResolution
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.