pub trait IndexExtension<C>: Sized {
// Provided methods
fn get(self, collection: &C) -> Option<&<C as Get<Self>>::Output>
where C: Get<Self>,
<C as Get<Self>>::Output: Sized { ... }
unsafe fn get_unchecked(self, collection: &C) -> &<C as Get<Self>>::Output
where C: Get<Self>,
<C as Get<Self>>::Output: Sized { ... }
fn get_mut(self, collection: &mut C) -> Option<&<C as Get<Self>>::Output>
where C: GetMut<Self>,
<C as Get<Self>>::Output: Sized { ... }
unsafe fn get_unchecked_mut(
self,
collection: &mut C,
) -> &mut <C as Get<Self>>::Output
where C: GetMut<Self>,
<C as Get<Self>>::Output: Sized { ... }
fn is_valid(self, collection: &C) -> bool
where C: Get<Self>,
<C as Get<Self>>::Output: Sized { ... }
fn is_invalid(self, collection: &C) -> bool
where C: Get<Self>,
<C as Get<Self>>::Output: Sized { ... }
fn remove(self, collection: &mut C) -> Option<<C as Remove<Self>>::Output>
where C: Remove<Self> { ... }
}Provided Methods§
fn get(self, collection: &C) -> Option<&<C as Get<Self>>::Output>
unsafe fn get_unchecked(self, collection: &C) -> &<C as Get<Self>>::Output
fn get_mut(self, collection: &mut C) -> Option<&<C as Get<Self>>::Output>
unsafe fn get_unchecked_mut( self, collection: &mut C, ) -> &mut <C as Get<Self>>::Output
fn is_valid(self, collection: &C) -> bool
fn is_invalid(self, collection: &C) -> bool
fn remove(self, collection: &mut C) -> Option<<C as Remove<Self>>::Output>where
C: Remove<Self>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.