Struct core::slice::GetManyMutError
source · pub struct GetManyMutError<const N: usize> { /* private fields */ }
🔬This is a nightly-only experimental API. (
get_many_mut
#104642)Expand description
get_many_mut<N>
返回的错误类型。
它表示两个可能的错误之一:
- 索引越界。
- 同一个索引在数组中出现多次。
Examples
#![feature(get_many_mut)]
let v = &mut [1, 2, 3];
assert!(v.get_many_mut([0, 999]).is_err());
assert!(v.get_many_mut([1, 1]).is_err());
RunTrait Implementations§
source§impl<const N: usize> Debug for GetManyMutError<N>
impl<const N: usize> Debug for GetManyMutError<N>
source§impl<const N: usize> Display for GetManyMutError<N>
impl<const N: usize> Display for GetManyMutError<N>
Auto Trait Implementations§
impl<const N: usize> RefUnwindSafe for GetManyMutError<N>
impl<const N: usize> Send for GetManyMutError<N>
impl<const N: usize> Sync for GetManyMutError<N>
impl<const N: usize> Unpin for GetManyMutError<N>
impl<const N: usize> UnwindSafe for GetManyMutError<N>
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
从拥有的值中借用。 Read more