pub struct PooledInstance { /* private fields */ }Expand description
RAII wrapper around a pool-drawn instance.
On the success path the caller’s invoke loop calls
InstancePool::release explicitly before this handle drops, which
is what returns the instance (via reset + fresh-replacement) to the
warm channel. If the handle is dropped without an explicit
release — caller panic, future cancellation, etc. — the instance
remains registered with the executor and the existing auto-terminate
drop-guard (api S-20) in call_export_with_args_then_terminate
catches it. A bare-drop without an outer terminate guard leaks the
registry entry; T37 keeps that case out of scope.
The handle carries the originating module hash so
InstancePool::release can dispatch to the correct per-tuple
channel without re-hashing the wasm bytes (which the release path
no longer has on hand).
Implementations§
Source§impl PooledInstance
impl PooledInstance
Sourcepub fn id(&self) -> InstanceId
pub fn id(&self) -> InstanceId
Borrow the underlying InstanceId.
Sourcepub fn into_inner(self) -> InstanceId
pub fn into_inner(self) -> InstanceId
Take ownership of the underlying InstanceId (caller becomes
responsible for the lifecycle).
Auto Trait Implementations§
impl Freeze for PooledInstance
impl RefUnwindSafe for PooledInstance
impl Send for PooledInstance
impl Sync for PooledInstance
impl Unpin for PooledInstance
impl UnsafeUnpin for PooledInstance
impl UnwindSafe for PooledInstance
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
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>
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>
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 more