pub struct InsufficientSpace { /* private fields */ }Expand description
An error that occurs when trying to write data to a buffer with insufficient space.
This error indicates that a write operation failed because the buffer does not have enough remaining capacity to hold the data.
Implementations§
Source§impl InsufficientSpace
impl InsufficientSpace
Sourcepub const fn new(requested: NonZeroUsize, available: usize) -> Self
pub const fn new(requested: NonZeroUsize, available: usize) -> Self
Creates a new InsufficientSpace error with the requested and available bytes.
§Panics
Panics if requested is not greater than available.
Sourcepub const fn requested(&self) -> NonZeroUsize
pub const fn requested(&self) -> NonZeroUsize
Returns the number of bytes requested to encode the value.
Trait Implementations§
Source§impl Clone for InsufficientSpace
impl Clone for InsufficientSpace
Source§fn clone(&self) -> InsufficientSpace
fn clone(&self) -> InsufficientSpace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InsufficientSpace
impl Debug for InsufficientSpace
Source§impl Display for InsufficientSpace
impl Display for InsufficientSpace
Source§impl Error for InsufficientSpace
impl Error for InsufficientSpace
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<InsufficientSpace> for ConstEncodeError
impl From<InsufficientSpace> for ConstEncodeError
Source§fn from(source: InsufficientSpace) -> Self
fn from(source: InsufficientSpace) -> Self
Converts to this type from the input type.
Source§impl From<InsufficientSpace> for EncodeError
impl From<InsufficientSpace> for EncodeError
Source§fn from(source: InsufficientSpace) -> Self
fn from(source: InsufficientSpace) -> Self
Converts to this type from the input type.
Source§impl Hash for InsufficientSpace
impl Hash for InsufficientSpace
Source§impl PartialEq for InsufficientSpace
impl PartialEq for InsufficientSpace
impl Copy for InsufficientSpace
impl Eq for InsufficientSpace
impl StructuralPartialEq for InsufficientSpace
Auto Trait Implementations§
impl Freeze for InsufficientSpace
impl RefUnwindSafe for InsufficientSpace
impl Send for InsufficientSpace
impl Sync for InsufficientSpace
impl Unpin for InsufficientSpace
impl UnwindSafe for InsufficientSpace
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