pub trait IndexExtension<C>: Sized {
// Provided methods
fn get(self, collection: &C) -> Option<&C::Output>
where C: Get<Self>,
C::Output: Sized { ... }
unsafe fn get_unchecked(self, collection: &C) -> &C::Output
where C: Get<Self>,
C::Output: Sized { ... }
fn get_mut(self, collection: &mut C) -> Option<&C::Output>
where C: GetMut<Self>,
C::Output: Sized { ... }
unsafe fn get_unchecked_mut(self, collection: &mut C) -> &mut C::Output
where C: GetMut<Self>,
C::Output: Sized { ... }
fn is_valid(self, collection: &C) -> bool
where C: Get<Self>,
C::Output: Sized { ... }
fn is_invalid(self, collection: &C) -> bool
where C: Get<Self>,
C::Output: Sized { ... }
fn remove(self, collection: &mut C) -> Option<C::Output>
where C: Remove<Self> { ... }
}Provided Methods§
fn get(self, collection: &C) -> Option<&C::Output>
unsafe fn get_unchecked(self, collection: &C) -> &C::Output
fn get_mut(self, collection: &mut C) -> Option<&C::Output>
unsafe fn get_unchecked_mut(self, collection: &mut C) -> &mut C::Output
fn is_valid(self, collection: &C) -> bool
fn is_invalid(self, collection: &C) -> bool
fn remove(self, collection: &mut C) -> Option<C::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.