pub struct AgentOsSidecar { /* private fields */ }Expand description
Public transport handle for a (possibly shared) native sidecar process hosting VMs.
Implementations§
Source§impl AgentOsSidecar
impl AgentOsSidecar
Sourcepub fn describe(&self) -> AgentOsSidecarDescription
pub fn describe(&self) -> AgentOsSidecarDescription
Snapshot the sidecar’s current state. SYNC.
Parity: TypeScript describe() returns a deep clone of the internal description so callers
cannot mutate sidecar state through the returned value. The Rust struct derives Clone, so
constructing a fresh AgentOsSidecarDescription from the current atomics produces the same
snapshot semantics.
Sourcepub async fn dispose(&self) -> Result<(), ClientError>
pub async fn dispose(&self) -> Result<(), ClientError>
Dispose the sidecar. Idempotent; disposes active leases and aggregates errors.
Parity with TypeScript AgentOsSidecar.dispose():
- If already
disposed, return immediately (idempotent). - Transition to
disposing. - Dispose every active lease, collecting (not short-circuiting on) errors.
- Reset
active_vm_countto 0 and transition todisposed. - If this sidecar is the cached shared sidecar for its pool, remove it from the pool.
- If any lease disposal failed, return an aggregated error.
Auto Trait Implementations§
impl !Freeze for AgentOsSidecar
impl !RefUnwindSafe for AgentOsSidecar
impl !UnwindSafe for AgentOsSidecar
impl Send for AgentOsSidecar
impl Sync for AgentOsSidecar
impl Unpin for AgentOsSidecar
impl UnsafeUnpin for AgentOsSidecar
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreCreates a shared type from an unshared type.