pub struct SliceOutOfBoundsError {
offset: usize,
length: usize,
buffer_len: usize,
}Expand description
A slice that does not fit in the buffer it is taken from.
Returned by Buffer::try_slice_with_length,
the alternative to Buffer::slice_with_length
that does not panic.
Fields§
§offset: usize§length: usize§buffer_len: usizeImplementations§
Trait Implementations§
Source§impl Clone for SliceOutOfBoundsError
impl Clone for SliceOutOfBoundsError
impl Copy for SliceOutOfBoundsError
Source§impl Debug for SliceOutOfBoundsError
impl Debug for SliceOutOfBoundsError
Source§impl Display for SliceOutOfBoundsError
impl Display for SliceOutOfBoundsError
impl Eq for SliceOutOfBoundsError
Source§impl Error for SliceOutOfBoundsError
impl Error for SliceOutOfBoundsError
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 PartialEq for SliceOutOfBoundsError
impl PartialEq for SliceOutOfBoundsError
impl StructuralPartialEq for SliceOutOfBoundsError
Auto Trait Implementations§
impl Freeze for SliceOutOfBoundsError
impl RefUnwindSafe for SliceOutOfBoundsError
impl Send for SliceOutOfBoundsError
impl Sync for SliceOutOfBoundsError
impl Unpin for SliceOutOfBoundsError
impl UnsafeUnpin for SliceOutOfBoundsError
impl UnwindSafe for SliceOutOfBoundsError
Blanket Implementations§
impl<T> Allocation for T
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