pub struct Data<M: DataMarker> { /* private fields */ }Expand description
Regular baked data: a trie for lookups and a slice of values
Implementations§
Source§impl<M: DataMarker> Data<M>
impl<M: DataMarker> Data<M>
Sourcepub const unsafe fn from_trie_and_values_unchecked(
trie: ZeroTrieSimpleAscii<&'static [u8]>,
values: &'static [M::DataStruct],
) -> Self
pub const unsafe fn from_trie_and_values_unchecked( trie: ZeroTrieSimpleAscii<&'static [u8]>, values: &'static [M::DataStruct], ) -> Self
Construct from a trie and values
§Safety
The actual values contained in the trie must be valid indices into values
Trait Implementations§
Source§impl<M: DataMarker> DataStore<M> for Data<M>
impl<M: DataMarker> DataStore<M> for Data<M>
Source§fn get(
&self,
id: DataIdentifierBorrowed<'_>,
attributes_prefix_match: bool,
) -> Option<DataPayload<M>>
fn get( &self, id: DataIdentifierBorrowed<'_>, attributes_prefix_match: bool, ) -> Option<DataPayload<M>>
Get the value for a key