#[non_exhaustive]pub enum StackError {
ExceedsFloor {
requested: usize,
available: usize,
},
Spawn(IoFailure),
}Expand description
Why on_stack did not run its computation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ExceedsFloor
The computation asked for more stack than is left above the running stack’s floor.
wasm32 has one shadow stack per instance and no second thread to give a
computation a stack of its own, so on_stack runs it inline on what is left of
the running stack: a request larger than that cannot be honoured, and is refused
here rather than trapping below the floor part-way through the computation.
Fields
Spawn(IoFailure)
The operating system would not start a thread with the requested stack.
Trait Implementations§
Source§impl Debug for StackError
impl Debug for StackError
Source§impl Display for StackError
impl Display for StackError
Source§impl Error for StackError
impl Error for StackError
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 StructuredError for StackError
impl StructuredError for StackError
Source§fn visit<'error>(&'error self, visitor: &mut dyn ErrorVisitor<'error>)
fn visit<'error>(&'error self, visitor: &mut dyn ErrorVisitor<'error>)
Report this value’s variant and fields without rendering it to text.
Borrowed payloads remain valid for the original value’s lifetime.
Auto Trait Implementations§
impl !RefUnwindSafe for StackError
impl !UnwindSafe for StackError
impl Forget for StackError
impl Freeze for StackError
impl Move for StackError
impl Send for StackError
impl Sync for StackError
impl Unpin for StackError
impl UnsafeUnpin for StackError
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