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: NonZero<usize>,
available: usize,
) -> InsufficientSpace
pub const fn new( requested: NonZero<usize>, available: usize, ) -> InsufficientSpace
Creates a new InsufficientSpace error with the requested and available bytes.
§Panics
Panics if requested is not greater than available.
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) -> ConstEncodeError
fn from(source: InsufficientSpace) -> ConstEncodeError
Converts to this type from the input type.
Source§impl From<InsufficientSpace> for EncodeError
impl From<InsufficientSpace> for EncodeError
Source§fn from(source: InsufficientSpace) -> EncodeError
fn from(source: InsufficientSpace) -> EncodeError
Converts to this type from the input type.
Source§impl From<InsufficientSpace> for Error
Available on crate feature std only.
impl From<InsufficientSpace> for Error
Available on crate feature
std only.Source§fn from(err: InsufficientSpace) -> Error
fn from(err: InsufficientSpace) -> Error
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more