pub struct AdvancedToolsControl { /* private fields */ }Implementations§
Source§impl AdvancedToolsControl
impl AdvancedToolsControl
Sourcepub async fn apply_state(&self, state: ToolState) -> Result<u64>
pub async fn apply_state(&self, state: ToolState) -> Result<u64>
Replace the entire tool-state snapshot.
This is a generation-checked escape hatch for hosts that intentionally
edit the full snapshot. Prefer ToolsControl availability methods for
ordinary tool policy changes.
Sourcepub async fn restore_state(&self, state: ToolState) -> Result<u64>
pub async fn restore_state(&self, state: ToolState) -> Result<u64>
Restore a persisted tool-state snapshot, adopting its generation.
Use this when re-applying a snapshot read from durable storage (session
resume), not an edited delta: it reconstructs the exact persisted surface
idempotently rather than requiring the snapshot to match the current
generation. A cold resume of a session whose surface reached generation
≥ 2 needs this — apply_state would reject it.
Trait Implementations§
Source§impl Clone for AdvancedToolsControl
impl Clone for AdvancedToolsControl
Source§fn clone(&self) -> AdvancedToolsControl
fn clone(&self) -> AdvancedToolsControl
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 !RefUnwindSafe for AdvancedToolsControl
impl !UnwindSafe for AdvancedToolsControl
impl Freeze for AdvancedToolsControl
impl Send for AdvancedToolsControl
impl Sync for AdvancedToolsControl
impl Unpin for AdvancedToolsControl
impl UnsafeUnpin for AdvancedToolsControl
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