pub struct AgentContextHandle { /* private fields */ }Expand description
Shared compatibility handle for tools explicitly using the Legacy dependency profile.
Implementations§
Source§impl AgentContextHandle
impl AgentContextHandle
Sourcepub fn new(context: AgentContext) -> Self
pub fn new(context: AgentContext) -> Self
Create a handle from a complete context snapshot.
Sourcepub fn snapshot(&self) -> AgentContext
pub fn snapshot(&self) -> AgentContext
Return the latest context snapshot held by this handle.
Sourcepub fn replace(&self, context: AgentContext)
pub fn replace(&self, context: AgentContext)
Replace the context snapshot held by this handle.
Sourcepub fn update(&self, update: impl FnOnce(&mut AgentContext))
pub fn update(&self, update: impl FnOnce(&mut AgentContext))
Mutate the context snapshot held by this handle.
Trait Implementations§
Source§impl Clone for AgentContextHandle
impl Clone for AgentContextHandle
Source§fn clone(&self) -> AgentContextHandle
fn clone(&self) -> AgentContextHandle
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 moreSource§impl Debug for AgentContextHandle
impl Debug for AgentContextHandle
Auto Trait Implementations§
impl Freeze for AgentContextHandle
impl RefUnwindSafe for AgentContextHandle
impl Send for AgentContextHandle
impl Sync for AgentContextHandle
impl Unpin for AgentContextHandle
impl UnsafeUnpin for AgentContextHandle
impl UnwindSafe for AgentContextHandle
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