#[non_exhaustive]pub enum OneShotError {
LengthOverflow,
Input(InputError),
PositionOverflow,
OutputTooSmall {
required: usize,
available: usize,
},
AllocationLimitExceeded {
required: usize,
limit: usize,
},
AllocationFailed {
requested: usize,
},
Backend(BackendFault),
}Expand description
Error returned by a canonical ordinary one-shot operation.
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.
LengthOverflow
The encoded output length cannot be represented by usize.
Input(InputError)
Strict validation rejected the ordinary input.
PositionOverflow
Absolute source positions cannot be represented by usize.
OutputTooSmall
The caller’s destination cannot hold the complete result.
AllocationLimitExceeded
The exact output exceeds the caller-selected allocation limit.
AllocationFailed
try_reserve_exact could not reserve the complete output allocation.
Backend(BackendFault)
An internal backend or state invariant failed.
Trait Implementations§
Source§impl Clone for OneShotError
impl Clone for OneShotError
Source§fn clone(&self) -> OneShotError
fn clone(&self) -> OneShotError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OneShotError
Source§impl Debug for OneShotError
impl Debug for OneShotError
Source§impl Display for OneShotError
impl Display for OneShotError
impl Eq for OneShotError
Source§impl Error for OneShotError
Available on crate feature std only.
impl Error for OneShotError
Available on crate feature
std only.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 PartialEq for OneShotError
impl PartialEq for OneShotError
impl StructuralPartialEq for OneShotError
Auto Trait Implementations§
impl Freeze for OneShotError
impl RefUnwindSafe for OneShotError
impl Send for OneShotError
impl Sync for OneShotError
impl Unpin for OneShotError
impl UnsafeUnpin for OneShotError
impl UnwindSafe for OneShotError
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