#[non_exhaustive]#[repr(u16)]pub enum Error {
Show 20 variants
_Reserved = 0,
InvalidUtf8 = 1,
UnsupportedProtocol = 2,
UnknownProtocol = 3,
InvalidEndpoint = 4,
NameInUse = 5,
InvalidHandle = 6,
Overflow = 7,
InvalidPointer = 8,
DeadServer = 9,
InvalidReturn = 10,
Invalid = 11,
AllocationFailure = 12,
InvalidArg = 13,
AsyncUnsupported = 14,
FutureCompat = 15,
EndOfData = 16,
ProtocolOverlap = 17,
ConditionNotMet = 18,
_MaxVal = 19,
}full only.Expand description
Types of error that can be returned from a syscall.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
_Reserved = 0
InvalidUtf8 = 1
String argument passed was malformed UTF-8.
UnsupportedProtocol = 2
Server or handle does not support requested protocol or method.
UnknownProtocol = 3
Unknown protocol or method.
InvalidEndpoint = 4
Requested endpoint name is invalid or does not exist.
NameInUse = 5
Requested endpoint name is already in use.
InvalidHandle = 6
Handle argument passed was invalid.
Overflow = 7
Too many open objects.
InvalidPointer = 8
Pointer argument passed was invalid.
DeadServer = 9
Server is no longer running.
InvalidReturn = 10
Incorrect return type for called method.
Invalid = 11
Generic error.
AllocationFailure = 12
Failed to allocate memory.
InvalidArg = 13
Argument passed is invalid.
AsyncUnsupported = 14
Requested method does not support being called asynchronously.
FutureCompat = 15
Passed argument value is reserved for future use.
EndOfData = 16
Object is not long enough for passed arguments.
ProtocolOverlap = 17
Protocol already exists on handle.
ConditionNotMet = 18
Condition required for method not met.
_MaxVal = 19
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AllocError> for Error
impl From<AllocError> for Error
Source§fn from(_: AllocError) -> Self
fn from(_: AllocError) -> Self
Source§impl From<Error> for AllocError
impl From<Error> for AllocError
Source§impl From<PointerError> for Error
impl From<PointerError> for Error
Source§fn from(_: PointerError) -> Self
fn from(_: PointerError) -> Self
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)