Expand description
The Identifiable trait allows you to use the
IdentifiedVecOf<User> instead of the more verbose IdentifiedVec<SomeUserID, User>but also allows you to skip theid_of_element: fn(&Element) -> ID` closure when
initializing a new identified vec.
Macros§
Enums§
Traits§
- Identifiable
- The
Identifiabletrait allows you to use theIdentifiedVecOf<User> instead of the more verboseIdentifiedVec<SomeUserID, User>but also allows you to skip theid_of_element: fn(&Element) -> ID` closure when initializing a new identified vec. - IsIdentifiable
VecOf Via - IsIdentified
VecOf - ViaMarker
- https://stackoverflow.com/a/66537661/1311272
Type Aliases§
- Identified
VecOf - IdentifiedVecOf ///
A type alias for
IdentifiedVec<Element::ID, Element>, this is the preferred and most powerful collection type of this crate, requires that yourElements impl theIdentifiabletrait. Using this collection allows you to skip passing theid_of_element: fn(&Element) -> IDclosure which you otherwise need to pass when initializing anIdentifiedVec. UsingIdentifiedVecOftogether with feature “serde” also gives serde serialization/deserialization as if it were aVec<Element>, given thatElementimplements serde serialization/deserialization of course.