pub struct SidecarBox<T: AdaptiveInstance> { /* private fields */ }Expand description
Boxed primitive + auto-unregistering sidecar handle.
Drop order is well-defined: handle drops first (blocks on scan,
then clears the registry slot), then the box drops (frees the
header/ring memory). No raw-pointer-after-free race.
Implementations§
Source§impl<T: AdaptiveInstance> SidecarBox<T>
impl<T: AdaptiveInstance> SidecarBox<T>
pub fn new(value: T) -> Self
pub fn id(&self) -> InstanceId
pub fn stats(&self) -> Option<InstanceStats>
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SidecarBox<T>
impl<T> !UnwindSafe for SidecarBox<T>
impl<T> Freeze for SidecarBox<T>
impl<T> Send for SidecarBox<T>
impl<T> Sync for SidecarBox<T>
impl<T> Unpin for SidecarBox<T>
impl<T> UnsafeUnpin for SidecarBox<T>where
Box<T>: UnsafeUnpin,
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