pub struct CapacityError<T = ()> { /* private fields */ }
Expand description
Error value indicating insufficient capacity
Implementations§
Source§impl<T> CapacityError<T>
impl<T> CapacityError<T>
Sourcepub const fn new(element: T) -> CapacityError<T>
pub const fn new(element: T) -> CapacityError<T>
Create a new CapacityError
from element
.
Sourcepub fn simplify(self) -> CapacityError
pub fn simplify(self) -> CapacityError
Convert into a CapacityError
that does not carry an element.
Trait Implementations§
Source§impl<T: Clone> Clone for CapacityError<T>
impl<T: Clone> Clone for CapacityError<T>
Source§fn clone(&self) -> CapacityError<T>
fn clone(&self) -> CapacityError<T>
Returns a copy 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<T> Debug for CapacityError<T>
impl<T> Debug for CapacityError<T>
Source§impl<T> Display for CapacityError<T>
impl<T> Display for CapacityError<T>
Source§impl<T: Any> Error for CapacityError<T>
Requires features="std"
.
impl<T: Any> Error for CapacityError<T>
Requires features="std"
.
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<T: Ord> Ord for CapacityError<T>
impl<T: Ord> Ord for CapacityError<T>
Source§fn cmp(&self, other: &CapacityError<T>) -> Ordering
fn cmp(&self, other: &CapacityError<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for CapacityError<T>
impl<T: PartialEq> PartialEq for CapacityError<T>
Source§impl<T: PartialOrd> PartialOrd for CapacityError<T>
impl<T: PartialOrd> PartialOrd for CapacityError<T>
impl<T: Copy> Copy for CapacityError<T>
impl<T: Eq> Eq for CapacityError<T>
impl<T> StructuralPartialEq for CapacityError<T>
Auto Trait Implementations§
impl<T> Freeze for CapacityError<T>where
T: Freeze,
impl<T> RefUnwindSafe for CapacityError<T>where
T: RefUnwindSafe,
impl<T> Send for CapacityError<T>where
T: Send,
impl<T> Sync for CapacityError<T>where
T: Sync,
impl<T> Unpin for CapacityError<T>where
T: Unpin,
impl<T> UnwindSafe for CapacityError<T>where
T: UnwindSafe,
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