Trait OptionalIndex

Source
pub trait OptionalIndex<I>
where I: ?Sized,
{ type Output: Clone + ?Sized; // Required method fn optional_index(&self, index: I) -> Option<&Self::Output>; }
Expand description

Optional immutable index.

Required Associated Types§

Required Methods§

Source

fn optional_index(&self, index: I) -> Option<&Self::Output>

Implementations on Foreign Types§

Source§

impl<T, I> OptionalIndex<I> for Option<T>
where T: OptionalIndex<I>,

Source§

type Output = <T as OptionalIndex<I>>::Output

Source§

fn optional_index(&self, index: I) -> Option<&Self::Output>

Source§

impl<T, I> OptionalIndex<I> for &T
where T: OptionalIndex<I>,

Source§

type Output = <T as OptionalIndex<I>>::Output

Source§

fn optional_index(&self, index: I) -> Option<&Self::Output>

Source§

impl<T, I> OptionalIndex<I> for &mut T
where T: OptionalIndex<I>,

Source§

type Output = <T as OptionalIndex<I>>::Output

Source§

fn optional_index(&self, index: I) -> Option<&Self::Output>

Implementors§