Struct infinitree::fields::strategy::SparseField
source · [−]pub struct SparseField<Field> {
pub field: Field,
}
Expand description
Stores values in the object pool, while keeping keys in the index
Fields
field: Field
Trait Implementations
sourceimpl<T> Collection for SparseField<LinkedList<T>> where
T: Value + Clone,
impl<T> Collection for SparseField<LinkedList<T>> where
T: Value + Clone,
type Depth = Incremental
type Depth = Incremental
Use this strategy to load the collection. Read more
type Key = SizedPointer
type Key = SizedPointer
The key that the predicate will use to decide whether to pull more data into memory. Read more
type Serialized = SizedPointer
type Serialized = SizedPointer
The serialized record format. This type will typically
implement serde::Serialize
Read more
type Item = T
type Item = T
This is equivalent to Iterator::Item
, and should contain a
full record that can be inserted into the in-memory store. Read more
sourcefn key(from: &Self::Serialized) -> &Self::Key
fn key(from: &Self::Serialized) -> &Self::Key
Get the key based on the deserialized data. You want this to be a reference that’s easy to derive from the serialized data. Read more
sourcefn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
Load the full record, and return it
sourceimpl<T> Collection for SparseField<List<T>> where
T: Value + Clone,
impl<T> Collection for SparseField<List<T>> where
T: Value + Clone,
type Key = SizedPointer
type Key = SizedPointer
The key that the predicate will use to decide whether to pull more data into memory. Read more
type Serialized = SizedPointer
type Serialized = SizedPointer
The serialized record format. This type will typically
implement serde::Serialize
Read more
type Item = T
type Item = T
This is equivalent to Iterator::Item
, and should contain a
full record that can be inserted into the in-memory store. Read more
sourcefn key(from: &Self::Serialized) -> &Self::Key
fn key(from: &Self::Serialized) -> &Self::Key
Get the key based on the deserialized data. You want this to be a reference that’s easy to derive from the serialized data. Read more
sourcefn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
Load the full record, and return it
sourceimpl<K, V> Collection for SparseField<Map<K, V>> where
K: Key,
V: Value,
impl<K, V> Collection for SparseField<Map<K, V>> where
K: Key,
V: Value,
type Key = K
type Key = K
The key that the predicate will use to decide whether to pull more data into memory. Read more
type Serialized = (K, SizedPointer)
type Serialized = (K, SizedPointer)
The serialized record format. This type will typically
implement serde::Serialize
Read more
type Item = (K, V)
type Item = (K, V)
This is equivalent to Iterator::Item
, and should contain a
full record that can be inserted into the in-memory store. Read more
sourcefn key(from: &Self::Serialized) -> &Self::Key
fn key(from: &Self::Serialized) -> &Self::Key
Get the key based on the deserialized data. You want this to be a reference that’s easy to derive from the serialized data. Read more
sourcefn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
Load the full record, and return it
sourceimpl<K, V> Collection for SparseField<VersionedMap<K, V>> where
K: Key,
V: Value,
impl<K, V> Collection for SparseField<VersionedMap<K, V>> where
K: Key,
V: Value,
type Depth = Incremental
type Depth = Incremental
Use this strategy to load the collection. Read more
type Key = K
type Key = K
The key that the predicate will use to decide whether to pull more data into memory. Read more
type Serialized = (K, Option<SizedPointer>)
type Serialized = (K, Option<SizedPointer>)
The serialized record format. This type will typically
implement serde::Serialize
Read more
type Item = (K, Option<Arc<V>>)
type Item = (K, Option<Arc<V>>)
This is equivalent to Iterator::Item
, and should contain a
full record that can be inserted into the in-memory store. Read more
sourcefn key(from: &Self::Serialized) -> &Self::Key
fn key(from: &Self::Serialized) -> &Self::Key
Get the key based on the deserialized data. You want this to be a reference that’s easy to derive from the serialized data. Read more
sourcefn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item
Load the full record, and return it
sourceimpl<T> Store for SparseField<LinkedList<T>> where
T: Value,
impl<T> Store for SparseField<LinkedList<T>> where
T: Value,
sourcefn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
fn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
Store the contents of the field into the index. The field itself needs to track whether this should be a complete rewrite or an upsert. Read more
sourceimpl<T> Store for SparseField<List<T>> where
T: Value,
impl<T> Store for SparseField<List<T>> where
T: Value,
sourcefn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
fn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
Store the contents of the field into the index. The field itself needs to track whether this should be a complete rewrite or an upsert. Read more
sourceimpl<K, V> Store for SparseField<Map<K, V>> where
K: Key,
V: Value,
impl<K, V> Store for SparseField<Map<K, V>> where
K: Key,
V: Value,
sourcefn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
fn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
Store the contents of the field into the index. The field itself needs to track whether this should be a complete rewrite or an upsert. Read more
sourceimpl<K, V> Store for SparseField<VersionedMap<K, V>> where
K: Key + Clone,
V: Value,
impl<K, V> Store for SparseField<VersionedMap<K, V>> where
K: Key + Clone,
V: Value,
sourcefn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
fn store(&mut self, transaction: &mut dyn Transaction, writer: &mut dyn Writer)
Store the contents of the field into the index. The field itself needs to track whether this should be a complete rewrite or an upsert. Read more
Auto Trait Implementations
impl<Field> RefUnwindSafe for SparseField<Field> where
Field: RefUnwindSafe,
impl<Field> Send for SparseField<Field> where
Field: Send,
impl<Field> Sync for SparseField<Field> where
Field: Sync,
impl<Field> Unpin for SparseField<Field> where
Field: Unpin,
impl<Field> UnwindSafe for SparseField<Field> where
Field: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Query for T where
T: Collection,
impl<T> Query for T where
T: Collection,
type Key = <T as Collection>::Key
type Key = <T as Collection>::Key
The key that the predicate will use to decide whether to pull more data into memory. Read more