pub enum Error {
Ur(Error),
CiboriumSer(Error<Error>),
CiboriumDe(Error<Error>),
Utf8(FromUtf8Error),
Token(Error),
UnexpectedUrType(String),
PartTooLarge {
actual: usize,
max: usize,
},
TooManyFragments {
actual: usize,
max: usize,
},
MessageTooLarge {
actual: usize,
max: usize,
},
}Expand description
NUT-16 Error
Variants§
Ur(Error)
UR encoding or decoding error
CiboriumSer(Error<Error>)
CBOR serialization error
CiboriumDe(Error<Error>)
CBOR deserialization error
Utf8(FromUtf8Error)
UR payload is not valid UTF-8
Token(Error)
Token error
UnexpectedUrType(String)
Received a UR of an unexpected type
PartTooLarge
An encoded UR part exceeds the decoder limit
TooManyFragments
A multipart UR declares too many source fragments
Fields
MessageTooLarge
A UR declares a reconstructed message that is too large
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Error
fn from(source: FromUtf8Error) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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