#[non_exhaustive]pub enum AisError {
BadArmouring {
offset: usize,
},
BadFill {
fill_bits: u8,
payload_bits: usize,
},
TooLong {
bits: usize,
limit: usize,
},
TooShort {
bits: usize,
needed: usize,
},
UnexpectedFragment {
expected: u8,
found: u8,
},
NoSlot,
Value {
field: &'static str,
error: KernelError,
},
}Expand description
Why a payload could not be unarmoured, reassembled or decoded.
#[non_exhaustive]; match with a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BadArmouring
Payload character outside the armouring alphabet.
BadFill
More fill bits than payload bits.
TooLong
Longer than any defined message.
TooShort
Message shorter than a field of its type.
UnexpectedFragment
Fragment not expected by the assembly: out of order, repeated, or without a first fragment.
NoSlot
Assembler built with zero slots.
Value
Field parsed but its value is outside the domain (latitude 95°, heading 400°).
Trait Implementations§
Source§impl Error for AisError
impl Error for AisError
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()
impl StructuralPartialEq for AisError
Auto Trait Implementations§
impl Freeze for AisError
impl RefUnwindSafe for AisError
impl Send for AisError
impl Sync for AisError
impl Unpin for AisError
impl UnsafeUnpin for AisError
impl UnwindSafe for AisError
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