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