pub struct OutOfBounds {
pub requested: usize,
pub available: usize,
}Expand description
Error type indicating an index or range is out of bounds.
Fields§
§requested: usizeThe requested index or size
available: usizeThe available length or capacity
Implementations§
Trait Implementations§
Source§impl Clone for OutOfBounds
impl Clone for OutOfBounds
impl Copy for OutOfBounds
Source§impl Debug for OutOfBounds
impl Debug for OutOfBounds
Source§impl Display for OutOfBounds
impl Display for OutOfBounds
impl Eq for OutOfBounds
Source§impl Error for OutOfBounds
impl Error for OutOfBounds
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<OutOfBounds> for Error
Available on crate feature std only.
impl From<OutOfBounds> for Error
Available on crate feature
std only.Source§fn from(value: OutOfBounds) -> Self
fn from(value: OutOfBounds) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OutOfBounds
impl PartialEq for OutOfBounds
impl StructuralPartialEq for OutOfBounds
Auto Trait Implementations§
impl Freeze for OutOfBounds
impl RefUnwindSafe for OutOfBounds
impl Send for OutOfBounds
impl Sync for OutOfBounds
impl Unpin for OutOfBounds
impl UnsafeUnpin for OutOfBounds
impl UnwindSafe for OutOfBounds
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.