#[non_exhaustive]pub enum MultiUuError {
EmptyCollection,
DecodeError(UuError),
DuplicatePart {
part_number: u32,
},
}Expand description
Errors produced by multi-part UUencoding reassembly.
This enum is #[non_exhaustive]; new variants may be added in future
releases without a breaking change.
§Example
use uuencoding_multi::MultiUuError;
let err = MultiUuError::EmptyCollection;
assert!(err.to_string().contains("empty"));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.
EmptyCollection
reassemble() was called on a PartCollection
that contains no parts with part_number >= 1. A collection that holds
only a TOC part (part_number = 0) triggers this error.
DecodeError(UuError)
A UUdecode error was returned by the uuencoding crate while decoding
one of the part bodies. Reassembly stops at the first failing part.
DuplicatePart
Two calls to PartCollection::add provided
entries with the same part_number. The duplicate entry is rejected and
the collection is left unchanged.
Trait Implementations§
Source§impl Debug for MultiUuError
impl Debug for MultiUuError
Source§impl Display for MultiUuError
impl Display for MultiUuError
Source§impl Error for MultiUuError
impl Error for MultiUuError
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 From<UuError> for MultiUuError
impl From<UuError> for MultiUuError
Source§impl PartialEq for MultiUuError
impl PartialEq for MultiUuError
Source§fn eq(&self, other: &MultiUuError) -> bool
fn eq(&self, other: &MultiUuError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MultiUuError
impl StructuralPartialEq for MultiUuError
Auto Trait Implementations§
impl Freeze for MultiUuError
impl RefUnwindSafe for MultiUuError
impl Send for MultiUuError
impl Sync for MultiUuError
impl Unpin for MultiUuError
impl UnsafeUnpin for MultiUuError
impl UnwindSafe for MultiUuError
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