pub enum TryPutIntegerCheckedError {
InvalidLength(InvalidIntegerLength),
OutOfRange {
value: i128,
min: i128,
max: i128,
nbytes: usize,
},
NotEnoughSpace(TryPutError),
}Expand description
Error returned by checked variable-width integer writers.
Unlike TryPutIntegerError, this error distinguishes values that cannot
be represented in the requested width from values that merely need more
writable capacity.
Variants§
InvalidLength(InvalidIntegerLength)
The requested integer width was outside the supported 0..=8 range.
OutOfRange
The value cannot be represented in the requested width.
Fields
NotEnoughSpace(TryPutError)
There was not enough writable capacity for the checked value.
Trait Implementations§
Source§impl Debug for TryPutIntegerCheckedError
impl Debug for TryPutIntegerCheckedError
Source§impl Display for TryPutIntegerCheckedError
impl Display for TryPutIntegerCheckedError
impl Eq for TryPutIntegerCheckedError
Source§impl Error for TryPutIntegerCheckedError
impl Error for TryPutIntegerCheckedError
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<InvalidIntegerLength> for TryPutIntegerCheckedError
impl From<InvalidIntegerLength> for TryPutIntegerCheckedError
Source§fn from(value: InvalidIntegerLength) -> Self
fn from(value: InvalidIntegerLength) -> Self
Converts to this type from the input type.
Source§impl From<TryPutError> for TryPutIntegerCheckedError
impl From<TryPutError> for TryPutIntegerCheckedError
Source§fn from(value: TryPutError) -> Self
fn from(value: TryPutError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for TryPutIntegerCheckedError
Auto Trait Implementations§
impl Freeze for TryPutIntegerCheckedError
impl RefUnwindSafe for TryPutIntegerCheckedError
impl Send for TryPutIntegerCheckedError
impl Sync for TryPutIntegerCheckedError
impl Unpin for TryPutIntegerCheckedError
impl UnsafeUnpin for TryPutIntegerCheckedError
impl UnwindSafe for TryPutIntegerCheckedError
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
Source§impl<T> ToUtf8Bytes for T
impl<T> ToUtf8Bytes for T
Source§fn to_utf8bytes(&self) -> Utf8Bytes<Shared>
fn to_utf8bytes(&self) -> Utf8Bytes<Shared>
Available on crate features
alloc or std only.Source§fn to_compact_utf8bytes(&self) -> Utf8Bytes<Compact>
fn to_compact_utf8bytes(&self) -> Utf8Bytes<Compact>
Available on crate features
alloc or std only.