pub enum WasmHandleError {
SlotOutOfRange {
slot: u32,
table_size: u32,
},
StaleGeneration {
slot: u32,
expected: u32,
actual: u32,
},
AlreadyReleased {
slot: u32,
},
InvalidTransfer {
slot: u32,
current: WasmHandleOwnership,
},
NotPinned {
slot: u32,
},
ReleasePinned {
slot: u32,
},
ReleaseBeforeClosed {
slot: u32,
state: WasmBoundaryState,
},
ReleaseWithLiveDescendants {
slot: u32,
live_descendants: usize,
},
OwnershipCycle {
slot: u32,
parent_slot: u32,
},
InvalidStateTransition {
slot: u32,
from: WasmBoundaryState,
to: WasmBoundaryState,
},
}Expand description
Error when a handle operation violates ownership protocol.
Variants§
SlotOutOfRange
Handle slot does not exist in the table.
StaleGeneration
Handle generation does not match (stale handle / use-after-free).
Fields
AlreadyReleased
Handle has already been released.
InvalidTransfer
Cannot transfer ownership of a handle that is not WasmOwned.
NotPinned
Cannot unpin a handle that is not pinned.
ReleasePinned
Cannot release a pinned handle without unpinning first.
ReleaseBeforeClosed
Cannot release a handle before its boundary lifecycle is closed.
ReleaseWithLiveDescendants
Cannot release a handle while it still owns live descendants.
Fields
OwnershipCycle
Ownership graph contains a cycle instead of a strict tree/forest.
Fields
InvalidStateTransition
Boundary state transition was not legal under contract.
Fields
§
from: WasmBoundaryStateCurrent boundary state.
§
to: WasmBoundaryStateRequested boundary state.
Trait Implementations§
Source§impl Clone for WasmHandleError
impl Clone for WasmHandleError
Source§fn clone(&self) -> WasmHandleError
fn clone(&self) -> WasmHandleError
Returns a duplicate of the value. Read more
1.0.0 · 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 WasmHandleError
impl Debug for WasmHandleError
Source§impl Display for WasmHandleError
impl Display for WasmHandleError
Source§impl Error for WasmHandleError
impl Error for WasmHandleError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<WasmHandleError> for WasmDispatchError
impl From<WasmHandleError> for WasmDispatchError
Source§fn from(source: WasmHandleError) -> Self
fn from(source: WasmHandleError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WasmHandleError
impl PartialEq for WasmHandleError
impl Eq for WasmHandleError
impl StructuralPartialEq for WasmHandleError
Auto Trait Implementations§
impl Freeze for WasmHandleError
impl RefUnwindSafe for WasmHandleError
impl Send for WasmHandleError
impl Sync for WasmHandleError
impl Unpin for WasmHandleError
impl UnsafeUnpin for WasmHandleError
impl UnwindSafe for WasmHandleError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).