Enum GetDisjointMutError

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.

Implementations

impl Clone for GetDisjointMutError

fn clone(self: &Self) -> GetDisjointMutError

impl Debug for GetDisjointMutError

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

impl Display for GetDisjointMutError

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

impl Eq for GetDisjointMutError

impl Error for crate::slice::GetDisjointMutError

impl Freeze for GetDisjointMutError

impl PartialEq for GetDisjointMutError

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

impl RefUnwindSafe for GetDisjointMutError

impl Send for GetDisjointMutError

impl StructuralPartialEq for GetDisjointMutError

impl Sync for GetDisjointMutError

impl Unpin for GetDisjointMutError

impl UnwindSafe for GetDisjointMutError

impl<T> Any for GetDisjointMutError

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for GetDisjointMutError

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for GetDisjointMutError

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

impl<T> CloneToUninit for GetDisjointMutError

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

impl<T> From for GetDisjointMutError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for GetDisjointMutError

fn into(self: 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 for GetDisjointMutError

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

impl<T, U> TryInto for GetDisjointMutError

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