Enum GetDisjointMutError

pub enum GetDisjointMutError

The error type returned by [get_disjoint_mut]slice::get_disjoint_mut.

It indicates one of two possible errors:

Examples

use std::slice::GetDisjointMutError;

let v = &mut [1, 2, 3];
assert_eq!(v.get_disjoint_mut([0, 999]), Err(GetDisjointMutError::IndexOutOfBounds));
assert_eq!(v.get_disjoint_mut([1, 1]), Err(GetDisjointMutError::OverlappingIndices));

Variants

IndexOutOfBounds

An index provided was out-of-bounds for the slice.

OverlappingIndices

Two indices provided were overlapping.

Trait Implementations

impl Clone for GetDisjointMutError

fn clone(&self) -> GetDisjointMutError

impl Debug for GetDisjointMutError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for GetDisjointMutError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for GetDisjointMutError

fn assert_fields_are_eq(&self)

impl Error for GetDisjointMutError

impl PartialEq for GetDisjointMutError

fn eq(&self, other: &GetDisjointMutError) -> bool

impl StructuralPartialEq for GetDisjointMutError

Auto Trait Implementations

impl Freeze for GetDisjointMutError

impl RefUnwindSafe for GetDisjointMutError

impl Send for GetDisjointMutError

impl Sync for GetDisjointMutError

impl Unpin for GetDisjointMutError

impl UnsafeUnpin for GetDisjointMutError

impl UnwindSafe for GetDisjointMutError

Blanket Implementations

impl<T> Any for GetDisjointMutError where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for GetDisjointMutError where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for GetDisjointMutError where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for GetDisjointMutError where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for GetDisjointMutError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for GetDisjointMutError where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for GetDisjointMutError

impl<T, U> Into<U> for GetDisjointMutError where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for GetDisjointMutError where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for GetDisjointMutError where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>