pub struct SessionRequestContext {
pub base_context: McpRequestContext,
pub session: Option<Session>,
pub jwt_authenticated: bool,
pub auto_created_session: bool,
}
Expand description
Enhanced request context with session information
Fields§
§base_context: McpRequestContext
Base request context
session: Option<Session>
Active session (if any)
jwt_authenticated: bool
Whether request used JWT authentication
auto_created_session: bool
Session was created automatically
Implementations§
Source§impl SessionRequestContext
impl SessionRequestContext
pub fn new(base_context: McpRequestContext) -> Self
pub fn with_session(self, session: Session, auto_created: bool) -> Self
pub fn with_jwt_auth(self) -> Self
Sourcepub fn session_id(&self) -> Option<&str>
pub fn session_id(&self) -> Option<&str>
Get the session ID if available
Trait Implementations§
Source§impl Clone for SessionRequestContext
impl Clone for SessionRequestContext
Source§fn clone(&self) -> SessionRequestContext
fn clone(&self) -> SessionRequestContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SessionRequestContext
impl RefUnwindSafe for SessionRequestContext
impl Send for SessionRequestContext
impl Sync for SessionRequestContext
impl Unpin for SessionRequestContext
impl UnwindSafe for SessionRequestContext
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