pub enum WidePrefixError {
CapacityOverflow {
len: usize,
},
AllocationFailed {
len: usize,
},
IndexOutOfBounds {
index: usize,
len: usize,
},
InvalidRange {
start: usize,
end: usize,
len: usize,
},
EndOutOfBounds {
end: usize,
len: usize,
},
SumOverflow {
index: usize,
},
SumUnderflow {
index: usize,
},
InvariantViolation {
index: usize,
},
}Expand description
Failure returned by checked wide-prefix operations.
Variants§
CapacityOverflow
len + 1 cannot be represented as a usize.
AllocationFailed
The allocator rejected the requested capacity.
IndexOutOfBounds
An entry index is outside the sequence.
InvalidRange
A half-open range or endpoint is invalid.
EndOutOfBounds
A prefix endpoint is larger than the sequence length.
SumOverflow
A checked prefix or update would exceed u64::MAX.
SumUnderflow
A checked decrement would make a prefix negative.
InvariantViolation
Internal prefix ordering was inconsistent.
Trait Implementations§
Source§impl Clone for WidePrefixError
impl Clone for WidePrefixError
impl Copy for WidePrefixError
Source§impl Debug for WidePrefixError
impl Debug for WidePrefixError
Source§impl Display for WidePrefixError
impl Display for WidePrefixError
impl Eq for WidePrefixError
Source§impl Error for WidePrefixError
impl Error for WidePrefixError
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 WidePrefixError
impl PartialEq for WidePrefixError
impl StructuralPartialEq for WidePrefixError
Auto Trait Implementations§
impl Forget for WidePrefixError
impl Freeze for WidePrefixError
impl Move for WidePrefixError
impl RefUnwindSafe for WidePrefixError
impl Send for WidePrefixError
impl Sync for WidePrefixError
impl Unpin for WidePrefixError
impl UnsafeUnpin for WidePrefixError
impl UnwindSafe for WidePrefixError
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