pub trait Query<I, V> where
I: Identity,
V: Identifiable<I>, {
fn query(&self, identifier: &I) -> Option<&V>;
fn all(&self) -> Vec<&V, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn create_index(&self) -> HashMap<I, Link<'_, I, V>, RandomState> { ... }
}
Expand description
Be able to query some type given an identifier. It must return a type that can be queried for more values like itself.
Query a datastore for a type that can be used to find more like it
Required Methods
Provided Methods
fn create_index(&self) -> HashMap<I, Link<'_, I, V>, RandomState>
Implementations on Foreign Types
sourceimpl<'a, I, V, T> Query<I, V> for &'a T where
T: Query<I, V>,
I: Identity,
V: Identifiable<I>,
impl<'a, I, V, T> Query<I, V> for &'a T where
T: Query<I, V>,
I: Identity,
V: Identifiable<I>,
sourceimpl<'a, I, V> Query<I, V> for HashMap<I, Link<'a, I, V>, RandomState> where
I: Identity,
V: Identifiable<I>,
impl<'a, I, V> Query<I, V> for HashMap<I, Link<'a, I, V>, RandomState> where
I: Identity,
V: Identifiable<I>,
sourceimpl<'a> Query<ModuleIdentifier, Module<'a>> for Modules<'a>
impl<'a> Query<ModuleIdentifier, Module<'a>> for Modules<'a>
fn query(&self, _identifier: &ModuleIdentifier) -> Option<&Module<'a>>
fn all(&self) -> Vec<&Module<'a>, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,