pub struct ResumableChildSession { /* private fields */ }Expand description
Cloneable single-take container carrying a persisted child LoadedSession
across the synchronous ChildRuntimeFactory boundary when waking a
subagent after parent session resume.
Implementations§
Source§impl ResumableChildSession
impl ResumableChildSession
Sourcepub fn new(loaded: LoadedSession) -> Self
pub fn new(loaded: LoadedSession) -> Self
Wraps a loaded child session so the factory can take ownership once.
Sourcepub fn take(&self) -> Option<LoadedSession>
pub fn take(&self) -> Option<LoadedSession>
Takes the wrapped LoadedSession, returning None if already consumed.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ResumableChildSession
impl Freeze for ResumableChildSessionwhere
*const ArcInner<Mutex<Option<LoadedSession>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<Option<LoadedSession>>>>: Freeze,
impl Move for ResumableChildSession
impl RefUnwindSafe for ResumableChildSession
impl Send for ResumableChildSession
impl Sync for ResumableChildSession
impl Unpin for ResumableChildSession
impl UnsafeUnpin for ResumableChildSessionwhere
*const ArcInner<Mutex<Option<LoadedSession>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Option<LoadedSession>>>>: UnsafeUnpin,
impl UnwindSafe for ResumableChildSession
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