Enum packtool::Error [−][src]
pub enum Error { InvalidSize { ty: &'static str, received: usize, expected: usize, }, Assumption { ty: &'static str, assumption: &'static str, message: String, }, InvalidDiscriminant { ty: &'static str, options: &'static str, found: Box<dyn Debug + Send + Sync>, }, InvalidField { ty: &'static str, field: &'static str, }, InvalidTuple { ty: &'static str, index: usize, }, Message(Cow<'static, str>), Custom(Box<dyn Error + Send + Sync>), Context { ty: &'static str, error: Box<Self>, cause: Box<Self>, }, }
Expand description
error associated to unpacking or creating [View
] of [Packed
] types.
Variants
error that is returned if an invalid size is detected
this will happen when calling [View::try_from_slice
]
for example.
Show fields
error that is created when an assumption is false
this is used by ensure
macro
Show fields
error when trying to check an Enumeration against a slice
Show fields
Show fields
Show fields
Show fields
Implementations
convenient function to create an Error::InvalidSize
with the type_name of T
being captured
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error