pub struct AuthenticatedMarker<T>(/* private fields */);Expand description
Marker for handlers that declare an Auth extractor as their second parameter.
The generated handler reads the current identity from the task-local auth
context set by core.rs before each dispatch. If no identity is present,
the handler returns McpError::Unauthorized before the user function is
even called.
Trait Implementations§
Source§impl<F, Fut, R, T> ToolHandler<AuthenticatedMarker<T>> for F
Available on crate feature auth only.
impl<F, Fut, R, T> ToolHandler<AuthenticatedMarker<T>> for F
Available on crate feature
auth only.fn into_handler_fn(self) -> ToolHandlerFn
Auto Trait Implementations§
impl<T> Freeze for AuthenticatedMarker<T>
impl<T> RefUnwindSafe for AuthenticatedMarker<T>where
T: RefUnwindSafe,
impl<T> Send for AuthenticatedMarker<T>where
T: Send,
impl<T> Sync for AuthenticatedMarker<T>where
T: Sync,
impl<T> Unpin for AuthenticatedMarker<T>where
T: Unpin,
impl<T> UnsafeUnpin for AuthenticatedMarker<T>
impl<T> UnwindSafe for AuthenticatedMarker<T>where
T: UnwindSafe,
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