pub enum ParsingError {
ShortHeader {
expected_min_len: usize,
obtained_len: usize,
},
MagicMismatch {
expected: [u8; 8],
obtained: Vec<u8>,
},
ItemLengthMismatch {
expected: usize,
obtained: usize,
},
ItemMinLengthMismatch {
expected_at_least: usize,
obtained: usize,
},
ItemLengthNotDivisible {
expected_divisor: usize,
obtained_length: usize,
},
InvalidOemEncoding {
value: Vec<u8>,
},
InvalidUtf16 {
value: Vec<u16>,
},
OffsetTooLargeIsize,
LengthTooLargeIsize,
StartOutOfRange {
start: isize,
length: usize,
},
EndOutOfRange {
end: isize,
length: usize,
},
NeitherUnicodeNorOem,
}Expand description
An error that may occur while parsing existing NTLM packets.
Variants§
ShortHeader
The header is shorter than expected.
MagicMismatch
The magic value does not match the expected one.
ItemLengthMismatch
An internal item has a different length than expected.
ItemMinLengthMismatch
An internal item is shorter than expected.
ItemLengthNotDivisible
An internal item’s length is not divisible by an expected divisor.
InvalidOemEncoding
A byte string cannot be decoded using the current OEM encoding.
InvalidUtf16
A string of 16-bit characters could not be decoded as UTF-8.
OffsetTooLargeIsize
An offset is too large for the isize type.
LengthTooLargeIsize
A length is too large for the isize type.
StartOutOfRange
A start value is out of the range of a slice.
EndOutOfRange
An end value is out of the range of a slice.
NeitherUnicodeNorOem
Neither Unicode nor OEM encoding was selected.
Trait Implementations§
Source§impl Clone for ParsingError
impl Clone for ParsingError
Source§fn clone(&self) -> ParsingError
fn clone(&self) -> ParsingError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParsingError
impl Debug for ParsingError
Source§impl Display for ParsingError
impl Display for ParsingError
Source§impl Error for ParsingError
impl Error for ParsingError
1.30.0 · 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 Hash for ParsingError
impl Hash for ParsingError
Source§impl Ord for ParsingError
impl Ord for ParsingError
Source§fn cmp(&self, other: &ParsingError) -> Ordering
fn cmp(&self, other: &ParsingError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ParsingError
impl PartialEq for ParsingError
Source§impl PartialOrd for ParsingError
impl PartialOrd for ParsingError
impl Eq for ParsingError
impl StructuralPartialEq for ParsingError
Auto Trait Implementations§
impl Freeze for ParsingError
impl RefUnwindSafe for ParsingError
impl Send for ParsingError
impl Sync for ParsingError
impl Unpin for ParsingError
impl UnwindSafe for ParsingError
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