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§

source§

impl<T> Collection for SparseField<LinkedList<T>>where T: Value + Clone,

§

type Depth = Incremental

Use this strategy to load the collection. Read more
§

type Key = SizedPointer

The key that the predicate will use to decide whether to pull more data into memory.
§

type Serialized = SizedPointer

The serialized record format. This type will typically implement serde::Serialize
§

type Item = T

This is equivalent to Iterator::Item, and should contain a full record that can be inserted into the in-memory store.
source§

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.
source§

fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item

Load the full record, and return it
source§

fn insert(&mut self, record: Self::Item)

Store the deserialized record in the collection
source§

impl<T> Collection for SparseField<List<T>>where T: Value + Clone,

§

type Depth = Snapshot

Use this strategy to load the collection. Read more
§

type Key = SizedPointer

The key that the predicate will use to decide whether to pull more data into memory.
§

type Serialized = SizedPointer

The serialized record format. This type will typically implement serde::Serialize
§

type Item = T

This is equivalent to Iterator::Item, and should contain a full record that can be inserted into the in-memory store.
source§

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.
source§

fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item

Load the full record, and return it
source§

fn insert(&mut self, record: Self::Item)

Store the deserialized record in the collection
source§

impl<K, V> Collection for SparseField<Map<K, V>>where K: Key, V: Value,

§

type Depth = Snapshot

Use this strategy to load the collection. Read more
§

type Key = K

The key that the predicate will use to decide whether to pull more data into memory.
§

type Serialized = (K, SizedPointer)

The serialized record format. This type will typically implement serde::Serialize
§

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.
source§

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.
source§

fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item

Load the full record, and return it
source§

fn insert(&mut self, record: Self::Item)

Store the deserialized record in the collection
source§

impl<K, V> Collection for SparseField<VersionedMap<K, V>>where K: Key, V: Value,

§

type Depth = Incremental

Use this strategy to load the collection. Read more
§

type Key = K

The key that the predicate will use to decide whether to pull more data into memory.
§

type Serialized = (K, Option<SizedPointer>)

The serialized record format. This type will typically implement serde::Serialize
§

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.
source§

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.
source§

fn load(from: Self::Serialized, object: &mut dyn Reader) -> Self::Item

Load the full record, and return it
source§

fn insert(&mut self, record: Self::Item)

Store the deserialized record in the collection
source§

impl<T> Store for SparseField<LinkedList<T>>where T: Value,

source§

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
source§

impl<T> Store for SparseField<List<T>>where T: Value,

source§

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
source§

impl<K, V> Store for SparseField<Map<K, V>>where K: Key, V: Value,

source§

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
source§

impl<K, V> Store for SparseField<VersionedMap<K, V>>where K: Key + Clone, V: Value,

source§

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
source§

impl<T: Send + Sync + Clone> Strategy<T> for SparseField<T>

source§

fn for_field(field: &T) -> Self

Instantiate a new Strategy.

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<K, T> Load for Twhere T: Query<Key = K>,

source§

fn load( &mut self, pool: Pool<AEADReader>, transaction_list: Vec<(Id, String, Stream), Global> )

Execute a load action. Read more
source§

impl<T> Query for Twhere T: Collection,

§

type Key = <T as Collection>::Key

The key that the predicate will use to decide whether to pull more data into memory.
source§

fn select( &mut self, pool: Pool<AEADReader>, transaction_list: Vec<(Id, String, Stream), Global>, predicate: impl Fn(&<T as Query>::Key) -> QueryAction )

Load items into memory based on a predicate Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V