EagerVec

Struct EagerVec 

Source
pub struct EagerVec<I, T>(/* private fields */);
Expand description

Stored vector with eager computation methods for deriving values from other vectors.

Wraps a StoredVec and provides various computation methods (transform, arithmetic operations, moving averages, etc.) to eagerly compute and persist derived data. Results are stored on disk and incrementally updated when source data changes.

Implementations§

Source§

impl<I, T> EagerVec<I, T>
where I: VecIndex, T: Compressable,

Source

pub fn forced_import_compressed( db: &Database, name: &str, version: Version, ) -> Result<Self>

Source

pub fn forced_import_compressed_with(options: ImportOptions<'_>) -> Result<Self>

Source

pub fn forced_import_raw( db: &Database, name: &str, version: Version, ) -> Result<Self>

Source

pub fn forced_import_raw_with(options: ImportOptions<'_>) -> Result<Self>

Source

pub fn forced_import( db: &Database, name: &str, version: Version, format: Format, ) -> Result<Self>

Source

pub fn forced_import_with( options: ImportOptions<'_>, format: Format, ) -> Result<Self>

Source

pub fn inner_version(&self) -> Version

Source

pub fn compute_to<F>( &mut self, max_from: I, to: usize, version: Version, t: F, exit: &Exit, ) -> Result<()>
where F: FnMut(I) -> (I, T),

Source

pub fn compute_range<A, F>( &mut self, max_from: I, other: &impl IterableVec<I, A>, t: F, exit: &Exit, ) -> Result<()>
where A: VecValue, F: FnMut(I) -> (I, T),

Source

pub fn compute_from_index<T2>( &mut self, max_from: I, other: &impl IterableVec<I, T2>, exit: &Exit, ) -> Result<()>
where T: From<I>, T2: VecValue,

Source

pub fn compute_transform<A, B, F>( &mut self, max_from: A, other: &impl IterableVec<A, B>, t: F, exit: &Exit, ) -> Result<()>
where A: VecIndex, B: VecValue, F: FnMut((A, B, &Self)) -> (I, T),

Source

pub fn compute_transform2<A, B, C, F>( &mut self, max_from: A, other1: &impl IterableVec<A, B>, other2: &impl IterableVec<A, C>, t: F, exit: &Exit, ) -> Result<()>
where A: VecIndex, B: VecValue, C: VecValue, F: FnMut((A, B, C, &Self)) -> (I, T),

Source

pub fn compute_transform3<A, B, C, D, F>( &mut self, max_from: A, other1: &impl IterableVec<A, B>, other2: &impl IterableVec<A, C>, other3: &impl IterableVec<A, D>, t: F, exit: &Exit, ) -> Result<()>
where A: VecIndex, B: VecValue, C: VecValue, D: VecValue, F: FnMut((A, B, C, D, &Self)) -> (I, T),

Source

pub fn compute_add( &mut self, max_from: I, added: &impl IterableVec<I, T>, adder: &impl IterableVec<I, T>, exit: &Exit, ) -> Result<()>
where T: Add<Output = T>,

Source

pub fn compute_subtract( &mut self, max_from: I, subtracted: &impl IterableVec<I, T>, subtracter: &impl IterableVec<I, T>, exit: &Exit, ) -> Result<()>
where T: CheckedSub,

Source

pub fn compute_multiply<T2, T3>( &mut self, max_from: I, multiplied: &impl IterableVec<I, T2>, multiplier: &impl IterableVec<I, T3>, exit: &Exit, ) -> Result<()>
where T2: VecValue, T3: VecValue, T: From<T2> + Mul<T3, Output = T>,

Source

pub fn compute_divide<T2, T3>( &mut self, max_from: I, divided: &impl IterableVec<I, T2>, divider: &impl IterableVec<I, T3>, exit: &Exit, ) -> Result<()>
where T2: VecValue, T3: VecValue, T: From<T2> + Mul<usize, Output = T> + Div<T3, Output = T> + CheckedSub<usize>,

Source

pub fn compute_all_time_high<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, exit: &Exit, ) -> Result<()>
where T: From<T2> + Ord, T2: VecValue,

Source

pub fn compute_all_time_low<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, exit: &Exit, ) -> Result<()>
where T: From<T2> + Ord + Default, T2: VecValue,

Source

pub fn compute_all_time_low_<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, exit: &Exit, exclude_default: bool, ) -> Result<()>
where T: From<T2> + Ord + Default, T2: VecValue,

Source

pub fn compute_percentage<T2, T3>( &mut self, max_from: I, divided: &impl IterableVec<I, T2>, divider: &impl IterableVec<I, T3>, exit: &Exit, ) -> Result<()>
where T2: VecValue, T3: VecValue, T: From<T2> + From<T3> + Mul<usize, Output = T> + Div<T, Output = T> + CheckedSub<usize>,

Source

pub fn compute_percentage_difference<T2, T3>( &mut self, max_from: I, divided: &impl IterableVec<I, T2>, divider: &impl IterableVec<I, T3>, exit: &Exit, ) -> Result<()>
where T2: VecValue, T3: VecValue, T: From<T2> + From<T3> + Mul<usize, Output = T> + Div<T, Output = T> + CheckedSub<usize>,

Source

pub fn compute_percentage_<T2, T3>( &mut self, max_from: I, divided: &impl IterableVec<I, T2>, divider: &impl IterableVec<I, T3>, exit: &Exit, as_difference: bool, ) -> Result<()>
where T2: VecValue, T3: VecValue, T: From<T2> + From<T3> + Mul<usize, Output = T> + Div<T, Output = T> + CheckedSub<usize>,

Source

pub fn compute_coarser( &mut self, max_from: T, other: &impl IterableVec<T, I>, exit: &Exit, ) -> Result<()>
where I: VecValue + VecIndex, T: VecIndex,

Source

pub fn compute_count_from_indexes<T2, T3>( &mut self, max_from: I, first_indexes: &impl IterableVec<I, T2>, other_to_else: &impl IterableVec<T2, T3>, exit: &Exit, ) -> Result<()>
where T: From<T2>, T2: VecValue + VecIndex + Copy + Add<usize, Output = T2> + CheckedSub<T2> + TryInto<T> + Default, <T2 as TryInto<T>>::Error: Error + 'static, T3: VecValue,

Source

pub fn compute_filtered_count_from_indexes<T2, T3, F>( &mut self, max_from: I, first_indexes: &impl IterableVec<I, T2>, other_to_else: &impl IterableVec<T2, T3>, filter: F, exit: &Exit, ) -> Result<()>
where T: From<T2>, T2: VecValue + VecIndex + Copy + Add<usize, Output = T2> + CheckedSub<T2> + TryInto<T> + Default, <T2 as TryInto<T>>::Error: Error + 'static, T3: VecValue, F: FnMut(T2) -> bool,

Source

pub fn compute_is_first_ordered<A>( &mut self, max_from: I, self_to_other: &impl IterableVec<I, A>, other_to_self: &impl IterableVec<A, I>, exit: &Exit, ) -> Result<()>
where I: VecValue, T: From<bool>, A: VecIndex + VecValue,

Source

pub fn compute_max<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, window: usize, exit: &Exit, ) -> Result<()>
where T2: VecValue + Ord, T: From<T2>,

Source

pub fn compute_min<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, window: usize, exit: &Exit, ) -> Result<()>
where T2: VecValue + Ord, T: From<T2>,

Source

pub fn compute_sum<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, window: usize, exit: &Exit, ) -> Result<()>
where T: Add<T, Output = T> + From<T2> + Default + CheckedSub, T2: VecValue,

Source

pub fn compute_sum_from_indexes<T2, T3>( &mut self, max_from: I, first_indexes: &impl IterableVec<I, T2>, indexes_count: &impl IterableVec<I, T3>, source: &impl IterableVec<T2, T>, exit: &Exit, ) -> Result<()>
where T: From<usize> + Add<T, Output = T>, T2: VecIndex + VecValue, T3: VecValue, usize: From<T3>,

Source

pub fn compute_sum_of_others( &mut self, max_from: I, others: &[&impl IterableVec<I, T>], exit: &Exit, ) -> Result<()>
where T: From<usize> + Add<T, Output = T>,

Source

pub fn compute_min_of_others( &mut self, max_from: I, others: &[&impl IterableVec<I, T>], exit: &Exit, ) -> Result<()>
where T: From<usize> + Add<T, Output = T> + Ord,

Source

pub fn compute_max_of_others( &mut self, max_from: I, others: &[&impl IterableVec<I, T>], exit: &Exit, ) -> Result<()>
where T: From<usize> + Add<T, Output = T> + Ord,

Source

pub fn compute_sma<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, sma: usize, exit: &Exit, ) -> Result<()>
where T: Add<T, Output = T> + From<T2> + Div<usize, Output = T> + From<f32>, T2: VecValue, f32: From<T> + From<T2>,

Source

pub fn compute_sma_<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, sma: usize, exit: &Exit, min_i: Option<I>, ) -> Result<()>
where T: Add<T, Output = T> + From<T2> + Div<usize, Output = T> + From<f32>, T2: VecValue, f32: From<T> + From<T2>,

Source

pub fn compute_ema<T2>( &mut self, max_from: I, source: &impl CollectableVec<I, T2>, ema: usize, exit: &Exit, ) -> Result<()>
where T: From<T2> + From<f32>, T2: VecValue + Div<usize, Output = T2> + Sum, f32: From<T2> + From<T>,

Source

pub fn compute_ema_<T2>( &mut self, max_from: I, source: &impl CollectableVec<I, T2>, ema: usize, exit: &Exit, min_i: Option<I>, ) -> Result<()>
where T: From<T2> + From<f32>, T2: VecValue + Div<usize, Output = T2> + Sum, f32: From<T2> + From<T>,

Source

pub fn compute_previous_value<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, len: usize, exit: &Exit, ) -> Result<()>
where I: CheckedSub, T2: VecValue + Default, f32: From<T2>, T: From<f32>,

Source

pub fn compute_change( &mut self, max_from: I, source: &impl IterableVec<I, T>, len: usize, exit: &Exit, ) -> Result<()>
where I: CheckedSub, T: CheckedSub + Default,

Source

pub fn compute_percentage_change<T2>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, len: usize, exit: &Exit, ) -> Result<()>
where I: CheckedSub, T2: VecValue + Default, f32: From<T2>, T: From<f32>,

Source

pub fn compute_cagr<T2>( &mut self, max_from: I, percentage_returns: &impl IterableVec<I, T2>, days: usize, exit: &Exit, ) -> Result<()>
where I: CheckedSub, T2: VecValue + Default, f32: From<T2>, T: From<f32>,

Source

pub fn compute_zscore<T2, T3, T4>( &mut self, max_from: I, source: &impl IterableVec<I, T2>, sma: &impl IterableVec<I, T3>, sd: &impl IterableVec<I, T4>, exit: &Exit, ) -> Result<()>
where T: From<f32>, T2: VecValue + Sub<T3, Output = T2> + Div<T4, Output = T>, T3: VecValue, T4: VecValue, f32: From<T2> + From<T3> + From<T4>,

Source

pub fn remove(self) -> Result<()>

Removes this vector and all its associated regions from the database

Trait Implementations§

Source§

impl<I, T> AnyStoredVec for EagerVec<I, T>
where I: VecIndex, T: Compressable,

Source§

fn db_path(&self) -> PathBuf

Source§

fn region(&self) -> &Region

Source§

fn header(&self) -> &Header

Source§

fn mut_header(&mut self) -> &mut Header

Source§

fn saved_stamped_changes(&self) -> u16

Number of stamped change files to keep for rollback support.
Source§

fn flush(&mut self) -> Result<()>

Source§

fn stored_len(&self) -> usize

The effective stored length (may differ from real_stored_len during truncation).
Source§

fn real_stored_len(&self) -> usize

The actual length stored on disk.
Source§

fn serialize_changes(&self) -> Result<Vec<u8>>

Source§

fn safe_flush(&mut self, exit: &Exit) -> Result<()>

Flushes while holding the exit lock to ensure consistency during shutdown.
Source§

fn update_stamp(&mut self, stamp: Stamp)

Source§

fn stamp(&self) -> Stamp

Source§

fn stamped_flush(&mut self, stamp: Stamp) -> Result<()>

Source§

impl<I, T> AnyVec for EagerVec<I, T>
where I: VecIndex, T: Compressable,

Source§

fn version(&self) -> Version

Source§

fn name(&self) -> &str

Source§

fn len(&self) -> usize

Source§

fn index_type_to_string(&self) -> &'static str

Returns the string representation of the index type.
Source§

fn value_type_to_size_of(&self) -> usize

Returns the size in bytes of the value type.
Source§

fn region_names(&self) -> Vec<String>

Returns the list of region names used by this vector.
Source§

fn is_empty(&self) -> bool

Source§

fn index_to_name(&self) -> String

Returns the combined name of the vector.
Source§

fn etag(&self, stamp: Stamp, to: Option<i64>) -> String

Generates an ETag for this vector based on stamp and optional end index.
Source§

fn i64_to_usize(&self, i: i64) -> usize

Converts an i64 index to usize, supporting negative indexing (Python-style).
Source§

impl<I: Clone, T: Clone> Clone for EagerVec<I, T>

Source§

fn clone(&self) -> EagerVec<I, T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<I: Debug, T: Debug> Debug for EagerVec<I, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I, T> GenericStoredVec<I, T> for EagerVec<I, T>
where I: VecIndex, T: Compressable,

Source§

fn pushed(&self) -> &[T]

Returns the current pushed (uncommitted) values.
Source§

fn mut_pushed(&mut self) -> &mut Vec<T>

Returns a mutable reference to the current pushed (uncommitted) values.
Source§

fn holes(&self) -> &BTreeSet<usize>

Returns the set of deleted indices (holes).
Source§

fn mut_holes(&mut self) -> &mut BTreeSet<usize>

Returns a mutable reference to the set of holes.
Source§

fn updated(&self) -> &BTreeMap<usize, T>

Returns the map of updated (uncommitted modifications to stored) values.
Source§

fn mut_updated(&mut self) -> &mut BTreeMap<usize, T>

Returns a mutable reference to the map of updated values.
Source§

fn truncate_if_needed(&mut self, index: I) -> Result<()>

Truncates the vector to the given index if the current length exceeds it.
Source§

fn reset(&mut self) -> Result<()>

Resets the vector state.
Source§

const SIZE_OF_T: usize = _

Source§

fn create_reader(&self) -> Reader<'_>

Creates a reader with lifetime tied to self. Be careful with deadlocks - drop the reader before mutable ops.
Source§

fn create_static_reader(&self) -> Reader<'static>

Creates a reader with ’static lifetime. Be careful with deadlocks - drop the reader before mutable ops.
Source§

fn read(&self, index: I, reader: &Reader<'_>) -> Result<T>

Reads value at index using provided reader.
Source§

fn read_once(&self, index: I) -> Result<T>

Reads value at index, creating a temporary reader. For multiple reads, prefer read() with a reused reader.
Source§

fn read_at(&self, index: usize, reader: &Reader<'_>) -> Result<T>

Reads value at usize index using provided reader.
Source§

fn read_at_once(&self, index: usize) -> Result<T>

Reads value at usize index, creating a temporary reader. For multiple reads, prefer read_at() with a reused reader.
Source§

fn read_unwrap(&self, index: I, reader: &Reader<'_>) -> T

Reads value at index using provided reader. Panics if read fails.
Source§

fn read_unwrap_once(&self, index: I) -> T

Reads value at index, creating a temporary reader. Panics if read fails. For multiple reads, prefer read_unwrap() with a reused reader.
Source§

fn read_at_unwrap(&self, index: usize, reader: &Reader<'_>) -> T

Reads value at usize index using provided reader. Panics if read fails.
Source§

fn read_at_unwrap_once(&self, index: usize) -> T

Reads value at usize index, creating a temporary reader. Panics if read fails. For multiple reads, prefer read_at_unwrap() with a reused reader.
Source§

fn get_or_read(&self, index: I, reader: &Reader<'_>) -> Result<Option<T>>

Gets value from any layer (updated, pushed, or storage) using provided reader. Returns None if index is in holes or beyond available data.
Source§

fn get_or_read_once(&self, index: I) -> Result<Option<T>>

Gets value from any layer, creating a temporary reader if needed. For multiple reads, prefer get_or_read() with a reused reader.
Source§

fn get_or_read_at(&self, index: usize, reader: &Reader<'_>) -> Result<Option<T>>

Gets value from any layer at usize index using provided reader. Returns None if index is in holes or beyond available data.
Source§

fn get_or_read_at_once(&self, index: usize) -> Result<Option<T>>

Gets value from any layer at usize index, creating a temporary reader. For multiple reads, prefer get_or_read_at() with a reused reader.
Source§

fn get_or_read_unwrap(&self, index: I, reader: &Reader<'_>) -> T

Gets value from any layer using provided reader. Panics on error.
Source§

fn get_or_read_unwrap_once(&self, index: I) -> T

Gets value from any layer, creating a temporary reader. Panics on error.
Source§

fn get_or_read_at_unwrap(&self, index: usize, reader: &Reader<'_>) -> T

Gets value from any layer at usize index using provided reader. Panics on error.
Source§

fn get_or_read_at_unwrap_once(&self, index: usize) -> T

Gets value from any layer at usize index, creating a temporary reader. Panics on error. For multiple reads, prefer get_or_read_at_unwrap() with a reused reader.
Source§

fn get_pushed_or_read(&self, index: I, reader: &Reader<'_>) -> Result<Option<T>>

Gets value from pushed layer or storage using provided reader. Does not check the updated layer.
Source§

fn get_pushed_or_read_once(&self, index: I) -> Result<Option<T>>

Gets value from pushed layer or storage, creating a temporary reader. For multiple reads, prefer get_pushed_or_read() with a reused reader.
Source§

fn get_pushed_or_read_at( &self, index: usize, reader: &Reader<'_>, ) -> Result<Option<T>>

Gets value from pushed layer or storage at usize index using provided reader. Does not check the updated layer.
Source§

fn get_pushed_or_read_at_once(&self, index: usize) -> Result<Option<T>>

Gets value from pushed layer or storage at usize index, creating a temporary reader. For multiple reads, prefer get_pushed_or_read_at() with a reused reader.
Source§

fn get_pushed_at(&self, index: usize, stored_len: usize) -> Option<&T>

Gets value from pushed layer only (no disk reads).
Source§

fn len_(&self) -> usize

Returns the length including both stored and pushed (uncommitted) values. Named len_ to avoid conflict with AnyVec::len.
Source§

fn pushed_len(&self) -> usize

Returns the number of pushed (uncommitted) values.
Source§

fn is_pushed_empty(&self) -> bool

Returns true if there are no pushed (uncommitted) values.
Source§

fn has(&self, index: I) -> bool

Returns true if the index is within the length.
Source§

fn has_at(&self, index: usize) -> bool

Returns true if the usize index is within the length.
Source§

fn push(&mut self, value: T)

Pushes a new value to the end of the vector.
Source§

fn push_if_needed(&mut self, index: I, value: T) -> Result<()>

Pushes a value if the index equals the current length, otherwise does nothing if already exists. Returns an error if the index is too high.
Source§

fn forced_push(&mut self, index: I, value: T, exit: &Exit) -> Result<()>

Pushes a value at the given index, truncating if necessary, and flushes if cache is full.
Source§

fn forced_push_at(&mut self, index: usize, value: T, exit: &Exit) -> Result<()>

Pushes a value at the given usize index, truncating if necessary, and flushes if cache is full.
Source§

fn update(&mut self, index: I, value: T) -> Result<()>

Updates the value at the given index.
Source§

fn update_at(&mut self, index: usize, value: T) -> Result<()>

Updates the value at the given usize index.
Source§

fn update_or_push(&mut self, index: I, value: T) -> Result<()>

Updates the value at the given index if it exists, or pushes it if the index equals length.
Source§

fn get_first_empty_index(&self) -> I

Returns the first empty index (either the first hole or the length).
Source§

fn fill_first_hole_or_push(&mut self, value: T) -> Result<I>

Fills the first hole with the value, or pushes if there are no holes. Returns the index used.
Source§

fn take(&mut self, index: I, reader: &Reader<'_>) -> Result<Option<T>>

Takes (removes and returns) the value at the given index using provided reader.
Source§

fn take_at(&mut self, index: usize, reader: &Reader<'_>) -> Result<Option<T>>

Takes (removes and returns) the value at the given usize index using provided reader.
Source§

fn delete(&mut self, index: I)

Deletes the value at the given index (marks it as a hole).
Source§

fn delete_at(&mut self, index: usize)

Deletes the value at the given usize index (marks it as a hole).
Source§

fn truncate_if_needed_at(&mut self, index: usize) -> Result<()>

Truncates the vector to the given usize index if the current length exceeds it.
Source§

fn truncate_if_needed_with_stamp( &mut self, index: I, stamp: Stamp, ) -> Result<()>

Truncates the vector to the given index if needed, updating the stamp.
Source§

fn clear(&mut self) -> Result<()>

Clears all values from the vector.
Source§

fn reset_unsaved(&mut self)

Resets uncommitted changes (pushed, holes, and updated layers).
Source§

fn validate_computed_version_or_reset(&mut self, version: Version) -> Result<()>

Validates the computed version against the stored version, resetting if they don’t match.
Source§

fn collect_holed(&self) -> Result<Vec<Option<T>>>

Collects all values into a Vec, with None for holes.
Source§

fn collect_holed_range( &self, from: Option<usize>, to: Option<usize>, ) -> Result<Vec<Option<T>>>

Collects values in the given range into a Vec, with None for holes.
Source§

fn is_dirty(&mut self) -> bool

Returns true if there are uncommitted changes (pushed or updated values).
Source§

fn changes_path(&self) -> PathBuf

Returns the path to the changes directory for this vector.
Source§

fn stamped_flush_maybe_with_changes( &mut self, stamp: Stamp, with_changes: bool, ) -> Result<()>

Flushes with the given stamp, optionally saving changes for rollback.
Source§

fn stamped_flush_with_changes(&mut self, stamp: Stamp) -> Result<()>

Flushes with the given stamp, saving changes to enable rollback.
Source§

fn rollback_before(&mut self, stamp: Stamp) -> Result<Stamp>

Rolls back changes to before the given stamp.
Source§

fn rollback(&mut self) -> Result<()>

Rolls back the most recent change set.
Source§

fn deserialize_then_undo_changes(&mut self, bytes: &[u8]) -> Result<()>

Deserializes change data and undoes those changes.
Source§

fn vec_region_name(&self) -> String

Returns the region name for this vector.
Source§

fn vec_region_name_with(name: &str) -> String

Returns the region name for the given vector name. MUST BE in sync with AnyVec::index_to_name
Source§

fn holes_region_name(&self) -> String

Returns the region name for the holes of this vector.
Source§

fn holes_region_name_with(name: &str) -> String

Returns the region name for the holes of the given vector name.
Source§

impl<'a, I, T> IntoIterator for &'a EagerVec<I, T>
where I: VecIndex, T: Compressable,

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = StoredVecIterator<'a, I, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<I, T> IterableVec<I, T> for EagerVec<I, T>
where I: VecIndex, T: Compressable,

Source§

fn iter(&self) -> BoxedVecIterator<'_, I, T>
where I: VecIndex, T: VecValue,

Source§

impl<I, T> TypedVec for EagerVec<I, T>
where I: VecIndex, T: Compressable,

Source§

type I = I

Source§

type T = T

Auto Trait Implementations§

§

impl<I, T> Freeze for EagerVec<I, T>

§

impl<I, T> !RefUnwindSafe for EagerVec<I, T>

§

impl<I, T> Send for EagerVec<I, T>
where I: Send, T: Send,

§

impl<I, T> Sync for EagerVec<I, T>
where I: Sync, T: Sync,

§

impl<I, T> Unpin for EagerVec<I, T>
where I: Unpin, T: Unpin,

§

impl<I, T> !UnwindSafe for EagerVec<I, T>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<V> AnyCollectableVec for V
where V: TypedVec + CollectableVec<<V as TypedVec>::I, <V as TypedVec>::T>,

Source§

fn collect_range_json_bytes( &self, from: Option<usize>, to: Option<usize>, ) -> Vec<u8>

Source§

fn range_count(&self, from: Option<i64>, to: Option<i64>) -> usize

Returns the number of items in the specified range.
Source§

fn range_weight(&self, from: Option<i64>, to: Option<i64>) -> usize

Returns the total size in bytes of items in the specified range.
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<I, T, V> CollectableVec<I, T> for V
where V: IterableVec<I, T> + Clone, I: VecIndex, T: VecValue,

Source§

fn iter_range( &self, from: Option<usize>, to: Option<usize>, ) -> impl Iterator<Item = T>

Returns an iterator over the specified range.
Source§

fn iter_signed_range( &self, from: Option<i64>, to: Option<i64>, ) -> impl Iterator<Item = T>

Returns an iterator over the specified range using signed indices (supports negative indexing).
Source§

fn collect(&self) -> Vec<T>

Collects all values into a Vec.
Source§

fn collect_range(&self, from: Option<usize>, to: Option<usize>) -> Vec<T>

Collects values in the specified range into a Vec.
Source§

fn collect_signed_range(&self, from: Option<i64>, to: Option<i64>) -> Vec<T>

Collects values in the specified range into a Vec using signed indices.
Source§

fn collect_range_json_bytes( &self, from: Option<usize>, to: Option<usize>, ) -> Vec<u8>

Collects values in the specified range as JSON bytes.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<I, T, U> IterableCloneableVec<I, T> for U
where U: 'static + IterableVec<I, T> + Clone,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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

impl<I, T, U> IterableStoredVec<I, T> for U
where U: 'static + IterableVec<I, T> + AnyStoredVec,