pub struct SessionState {
pub args: AgentArguments,
pub mcp_root: bool,
pub mcp_tools: Option<Vec<ClientObjectiveaiMcpEntry>>,
pub mcp_plugins: Option<Vec<ClientObjectiveaiMcpEntry>>,
}Expand description
Per-session state recorded by the header parser. Wraps the
legacy AgentArguments identity bag alongside the three
optional X-OBJECTIVEAI-MCP-* filter values, so a single
(record, get, remove) call cycle covers both. The wrapper
shape keeps the registry’s inner map single — one entry per
session, projected by callers via .args or the mcp_*
fields as needed.
mcp_root resolves to true when the
X-OBJECTIVEAI-MCP-ROOT header is absent on connect — the
header parser writes the resolved value here, so anything
stored is the final per-session decision. mcp_tools /
mcp_plugins are None when the corresponding header is
absent ⇒ no filter at list time. Some(vec![]) means
“explicitly allow none.”
Fields§
§args: AgentArguments§mcp_root: bool§mcp_tools: Option<Vec<ClientObjectiveaiMcpEntry>>§mcp_plugins: Option<Vec<ClientObjectiveaiMcpEntry>>Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
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 moreAuto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more