#[repr(i32)]pub enum FailCode {
IndexOutOfBounds = 1,
DivisionByZero = 2,
InvalidUtf8 = 3,
OutOfMemory = 4,
ListIndexTooWide = 5,
TextIndexTooWide = 6,
ListStoreIndexTooWide = 7,
IntTooWide = 8,
}Expand description
Why a compiled module stopped, for the failures whose message needs a runtime value.
Variants§
IndexOutOfBounds = 1
item i of xs where i names no element. The value is the index the program asked for.
DivisionByZero = 2
An integer division or modulo by zero. The value is unused.
InvalidUtf8 = 3
text_from_bytes(bytes) where the bytes are not valid UTF-8. The value is unused: the
reference tier appends the standard library’s own description of the fault, which a
compiled module has no way to reproduce, so the module reports the sentence they share.
OutOfMemory = 4
The allocator could not grow linear memory far enough for the next allocation. The value is unused: there is nothing more specific to report than the shape of the failure itself.
ListIndexTooWide = 5
item i of xs on a list, where i is an integer past a machine word. The value is unused: the
reference tier names the index’s type, not its digits.
TextIndexTooWide = 6
item i of t on a Text, where i is an integer past a machine word. The value is unused.
ListStoreIndexTooWide = 7
Set item i of xs to v, where i is an integer past a machine word. The value is unused.
IntTooWide = 8
An integer past a machine word reaching a place the module holds a machine word: an element, a field, a builtin’s argument. The value is unused.
Implementations§
Trait Implementations§
impl Copy for FailCode
impl Eq for FailCode
impl StructuralPartialEq for FailCode
Auto Trait Implementations§
impl Freeze for FailCode
impl RefUnwindSafe for FailCode
impl Send for FailCode
impl Sync for FailCode
impl Unpin for FailCode
impl UnsafeUnpin for FailCode
impl UnwindSafe for FailCode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.