pub enum ErrorCode {
BadArg,
BufferTooSmall,
InternalError,
InvalidPacket,
Unimplemented,
InvalidState,
AllocFail,
Unknown,
}
Expand description
Possible error codes.
Variants
BadArg
One or more invalid/out of range arguments.
BufferTooSmall
Not enough bytes allocated in the buffer.
InternalError
An internal error was detected.
InvalidPacket
The compressed data passed is corrupted.
Unimplemented
Invalid/unsupported request number.
InvalidState
An encoder or decoder structure is invalid or already freed.
AllocFail
Memory allocation has failed.
Unknown
An unknown failure.
Implementations
sourceimpl ErrorCode
impl ErrorCode
sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Get a human-readable error string for this error code.
Trait Implementations
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralEq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more