Enum oc_wasm_safe::error::Error [−][src]
pub enum Error { CborDecode, BufferTooShort, NoSuchComponent, NoSuchMethod, BadParameters, QueueFull, QueueEmpty, BadDescriptor, TooManyDescriptors, Other, Unknown, }
Expand description
The errors that a system call can return.
Variants
Implementations
Checks a system call return value of type isize
for an error value.
Returns a Result
containing an Error
if the value is negative, or the original value if
it was nonnegative.
Errors
This function fails if the parameter is negative, decoding the represented error code.
Panics
This function panics if the syscall error code is MemoryFault
or StringDecode
. These
syscall errors should be impossible in safe code because the type system prohibits them:
MemoryFault
should be impossible because all memory regions are taken as slices which are
always valid, and StringDecode
should be impossible because all strings are taken as
string-slices (&str
) which are always valid UTF-8.
Checks a system call return value of type i32
for an error value.
Returns a Result
containing an Error
if the value is negative, or the original value if
it was nonnegative.
Errors
This function fails if the parameter is negative, decoding the represented error code.
Panics
This function panics if the syscall error code is MemoryFault
or StringDecode
. These
syscall errors should be impossible in safe code because the type system prohibits them:
MemoryFault
should be impossible because all memory regions are taken as slices which are
always valid, and StringDecode
should be impossible because all strings are taken as
string-slices (&str
) which are always valid UTF-8.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more