pub struct TryGetError {
pub requested: usize,
pub available: usize,
}Expand description
Error type for the try_get_ methods of crate::Buffer.
Indicates that there were not enough remaining
bytes in the buffer while attempting
to get a value from a crate::Buffer with one
of the try_get_ methods.
Fields§
§requested: usizeThe number of bytes necessary to get the value
available: usizeThe number of bytes available in the buffer
Trait Implementations§
Source§impl Clone for TryGetError
impl Clone for TryGetError
impl Copy for TryGetError
Source§impl Debug for TryGetError
impl Debug for TryGetError
Source§impl Display for TryGetError
impl Display for TryGetError
impl Eq for TryGetError
Source§impl Error for TryGetError
impl Error for TryGetError
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<TryGetError> for TryGetError
Available on crate features alloc or std only.
impl From<TryGetError> for TryGetError
Available on crate features
alloc or std only.Source§fn from(value: TryGetError) -> Self
fn from(value: TryGetError) -> Self
Converts to this type from the input type.
Source§impl From<TryGetError> for TryGetError
Available on crate features alloc or std only.
impl From<TryGetError> for TryGetError
Available on crate features
alloc or std only.Source§fn from(value: TryGetError) -> Self
fn from(value: TryGetError) -> Self
Converts to this type from the input type.
Source§impl From<TryGetError> for Error
Available on crate feature std only.
impl From<TryGetError> for Error
Available on crate feature
std only.Source§fn from(value: TryGetError) -> Self
fn from(value: TryGetError) -> Self
Converts to this type from the input type.
Source§impl From<TryGetError> for TryGetIntegerError
impl From<TryGetError> for TryGetIntegerError
Source§fn from(value: TryGetError) -> Self
fn from(value: TryGetError) -> Self
Converts to this type from the input type.
Source§impl Hash for TryGetError
impl Hash for TryGetError
Source§impl PartialEq for TryGetError
impl PartialEq for TryGetError
impl StructuralPartialEq for TryGetError
Auto Trait Implementations§
impl Freeze for TryGetError
impl RefUnwindSafe for TryGetError
impl Send for TryGetError
impl Sync for TryGetError
impl Unpin for TryGetError
impl UnsafeUnpin for TryGetError
impl UnwindSafe for TryGetError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.