pub enum BerError {
UnexpectedEof,
InvalidTag(String),
InvalidLength,
LengthOverflow,
InvalidValue {
type_name: String,
details: String,
},
UnsupportedTagClass(u8),
BufferTooSmall {
needed: usize,
available: usize,
},
InvalidUtf8(FromUtf8Error),
IntegerConversion,
}Expand description
BER encoding/decoding errors.
Variants§
UnexpectedEof
Unexpected end of input.
InvalidTag(String)
Invalid tag encoding.
InvalidLength
Invalid length encoding.
LengthOverflow
Length overflow.
InvalidValue
Invalid value encoding.
UnsupportedTagClass(u8)
Unsupported tag class.
BufferTooSmall
Buffer too small.
InvalidUtf8(FromUtf8Error)
Invalid UTF-8 string.
IntegerConversion
Integer conversion error.
Implementations§
Trait Implementations§
Source§impl Error for BerError
impl Error for BerError
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 BerError
impl From<FromUtf8Error> for BerError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BerError
impl RefUnwindSafe for BerError
impl Send for BerError
impl Sync for BerError
impl Unpin for BerError
impl UnsafeUnpin for BerError
impl UnwindSafe for BerError
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