pub struct Map<C, F> { /* private fields */ }Expand description
A view collection that transforms views from a source collection using a mapping function.
Map wraps an existing view collection and applies a transformation function to each
view when it is accessed, allowing for lazy transformation of views.
Implementations§
Trait Implementations§
Source§impl<C, F, V> Views for Map<C, F>
impl<C, F, V> Views for Map<C, F>
Source§type Id = <C as Views>::Id
type Id = <C as Views>::Id
The type of unique identifier for items in the collection.
Must implement
Hash and Ord to ensure uniqueness and ordering.Source§fn get_id(&self, index: usize) -> Option<Self::Id>
fn get_id(&self, index: usize) -> Option<Self::Id>
Returns the unique identifier for the item at the specified index, or
None if out of bounds.Source§fn get_view(&self, index: usize) -> Option<Self::View>
fn get_view(&self, index: usize) -> Option<Self::View>
Returns the view at the specified index, or
None if the index is out of bounds.Auto Trait Implementations§
impl<C, F> Freeze for Map<C, F>
impl<C, F> RefUnwindSafe for Map<C, F>where
C: RefUnwindSafe,
F: RefUnwindSafe,
impl<C, F> Send for Map<C, F>
impl<C, F> Sync for Map<C, F>
impl<C, F> Unpin for Map<C, F>
impl<C, F> UnwindSafe for Map<C, F>where
C: UnwindSafe,
F: UnwindSafe,
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
Mutably borrows from an owned value. Read more