pub(super) struct McpTaskRegistry {
records: VecDeque<McpTaskRecord>,
}Expand description
Bounded in-memory registry for MCP task-progress records.
Fields§
§records: VecDeque<McpTaskRecord>Session-local task records.
Implementations§
Source§impl McpTaskRegistry
impl McpTaskRegistry
Sourcepub(super) fn active_count(&self) -> usize
pub(super) fn active_count(&self) -> usize
Return the number of admitted tasks that have not reached a terminal state.
Sourcepub(super) fn insert(&mut self, record: McpTaskRecord)
pub(super) fn insert(&mut self, record: McpTaskRecord)
Insert or replace one task record while preserving the fixed registry capacity.
Sourcepub(super) fn get(&self, task_id: &str) -> Option<McpTaskRecord>
pub(super) fn get(&self, task_id: &str) -> Option<McpTaskRecord>
Return a task record by id.
Sourcepub(super) fn update<F>(
&mut self,
task_id: &str,
update: F,
) -> Option<McpTaskRecord>where
F: FnOnce(&mut McpTaskRecord),
pub(super) fn update<F>(
&mut self,
task_id: &str,
update: F,
) -> Option<McpTaskRecord>where
F: FnOnce(&mut McpTaskRecord),
Update a matching task through a bounded mutable pass.
Trait Implementations§
Source§impl Clone for McpTaskRegistry
impl Clone for McpTaskRegistry
Source§fn clone(&self) -> McpTaskRegistry
fn clone(&self) -> McpTaskRegistry
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 McpTaskRegistry
impl RefUnwindSafe for McpTaskRegistry
impl Send for McpTaskRegistry
impl Sync for McpTaskRegistry
impl Unpin for McpTaskRegistry
impl UnsafeUnpin for McpTaskRegistry
impl UnwindSafe for McpTaskRegistry
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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