pub struct EagerVec<I, T>(/* private fields */);
Implementations§
Source§impl<I, T> EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
impl<I, T> EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
pub fn forced_import_compressed( db: &Database, name: &str, version: Version, ) -> Result<Self>
pub fn forced_import_compressed_with(options: ImportOptions<'_>) -> Result<Self>
pub fn forced_import_raw( db: &Database, name: &str, version: Version, ) -> Result<Self>
pub fn forced_import_raw_with(options: ImportOptions<'_>) -> Result<Self>
pub fn forced_import( db: &Database, name: &str, version: Version, format: Format, ) -> Result<Self>
pub fn forced_import_with( options: ImportOptions<'_>, format: Format, ) -> Result<Self>
pub fn get_or_read<'a, 'b>(
&'a self,
index: I,
reader: &'b Reader<'_>,
) -> Result<Option<Cow<'b, T>>>where
'a: 'b,
pub fn inner_version(&self) -> Version
pub fn validate_computed_version_or_reset( &mut self, version: Version, ) -> Result<()>
pub fn compute_to<F>( &mut self, max_from: I, to: usize, version: Version, t: F, exit: &Exit, ) -> Result<()>
pub fn compute_range<A, F>( &mut self, max_from: I, other: &impl AnyIterableVec<I, A>, t: F, exit: &Exit, ) -> Result<()>
pub fn compute_from_index<T2>( &mut self, max_from: I, other: &impl AnyIterableVec<I, T2>, exit: &Exit, ) -> Result<()>
pub fn compute_transform<A, B, F>( &mut self, max_from: A, other: &impl AnyIterableVec<A, B>, t: F, exit: &Exit, ) -> Result<()>
pub fn compute_transform2<A, B, C, F>( &mut self, max_from: A, other1: &impl AnyIterableVec<A, B>, other2: &impl AnyIterableVec<A, C>, t: F, exit: &Exit, ) -> Result<()>
pub fn compute_add(
&mut self,
max_from: I,
added: &impl AnyIterableVec<I, T>,
adder: &impl AnyIterableVec<I, T>,
exit: &Exit,
) -> Result<()>where
T: Add<Output = T>,
pub fn compute_subtract(
&mut self,
max_from: I,
subtracted: &impl AnyIterableVec<I, T>,
subtracter: &impl AnyIterableVec<I, T>,
exit: &Exit,
) -> Result<()>where
T: CheckedSub,
pub fn compute_max<T2>( &mut self, max_from: I, source: &impl AnyIterableVec<I, T2>, exit: &Exit, ) -> Result<()>
pub fn compute_multiply<T2, T3, T4>( &mut self, max_from: I, multiplied: &impl AnyIterableVec<I, T2>, multiplier: &impl AnyIterableVec<I, T3>, exit: &Exit, ) -> Result<()>
pub fn compute_divide<T2, T3, T4, T5>( &mut self, max_from: I, divided: &impl AnyIterableVec<I, T2>, divider: &impl AnyIterableVec<I, T3>, exit: &Exit, ) -> Result<()>
pub fn compute_percentage<T2, T3, T4, T5>( &mut self, max_from: I, divided: &impl AnyIterableVec<I, T2>, divider: &impl AnyIterableVec<I, T3>, exit: &Exit, ) -> Result<()>
pub fn compute_percentage_difference<T2, T3, T4, T5>( &mut self, max_from: I, divided: &impl AnyIterableVec<I, T2>, divider: &impl AnyIterableVec<I, T3>, exit: &Exit, ) -> Result<()>
pub fn compute_divide_<T2, T3, T4, T5>( &mut self, max_from: I, divided: &impl AnyIterableVec<I, T2>, divider: &impl AnyIterableVec<I, T3>, exit: &Exit, as_percentage: bool, as_difference: bool, ) -> Result<()>
pub fn compute_inverse_more_to_less( &mut self, max_from: T, other: &impl AnyIterableVec<T, I>, exit: &Exit, ) -> Result<()>
pub fn compute_inverse_less_to_more<T2>( &mut self, max_from: T, first_indexes: &impl AnyIterableVec<T, I>, indexes_count: &impl AnyIterableVec<T, T2>, exit: &Exit, ) -> Result<()>
pub fn compute_count_from_indexes<T2, T3>( &mut self, max_from: I, first_indexes: &impl AnyIterableVec<I, T2>, other_to_else: &impl AnyIterableVec<T2, T3>, exit: &Exit, ) -> Result<()>
pub fn compute_filtered_count_from_indexes<T2, T3, F>( &mut self, max_from: I, first_indexes: &impl AnyIterableVec<I, T2>, other_to_else: &impl AnyIterableVec<T2, T3>, filter: F, exit: &Exit, ) -> Result<()>
pub fn compute_is_first_ordered<A>( &mut self, max_from: I, self_to_other: &impl AnyIterableVec<I, A>, other_to_self: &impl AnyIterableVec<A, I>, exit: &Exit, ) -> Result<()>
pub fn compute_sum_from_indexes<T2, T3>( &mut self, max_from: I, first_indexes: &impl AnyIterableVec<I, T2>, indexes_count: &impl AnyIterableVec<I, T3>, source: &impl AnyIterableVec<T2, T>, exit: &Exit, ) -> Result<()>
pub fn compute_sum_of_others( &mut self, max_from: I, others: &[&impl AnyIterableVec<I, T>], exit: &Exit, ) -> Result<()>
pub fn compute_min_of_others( &mut self, max_from: I, others: &[&impl AnyIterableVec<I, T>], exit: &Exit, ) -> Result<()>
pub fn compute_max_of_others( &mut self, max_from: I, others: &[&impl AnyIterableVec<I, T>], exit: &Exit, ) -> Result<()>
pub fn compute_sma<T2>( &mut self, max_from: I, source: &impl AnyIterableVec<I, T2>, sma: usize, exit: &Exit, ) -> Result<()>
pub fn compute_sma_<T2>( &mut self, max_from: I, source: &impl AnyIterableVec<I, T2>, sma: usize, exit: &Exit, min_i: Option<I>, ) -> Result<()>
pub fn compute_previous_value<T2>( &mut self, max_from: I, source: &impl AnyIterableVec<I, T2>, len: usize, exit: &Exit, ) -> Result<()>
pub fn compute_change( &mut self, max_from: I, source: &impl AnyIterableVec<I, T>, len: usize, exit: &Exit, ) -> Result<()>
pub fn compute_percentage_change<T2>( &mut self, max_from: I, source: &impl AnyIterableVec<I, T2>, len: usize, exit: &Exit, ) -> Result<()>
pub fn compute_cagr<T2>( &mut self, max_from: I, percentage_returns: &impl AnyIterableVec<I, T2>, days: usize, exit: &Exit, ) -> Result<()>
pub fn compute_zscore<T2, T3, T4>( &mut self, max_from: I, ratio: &impl AnyIterableVec<I, T2>, sma: &impl AnyIterableVec<I, T3>, sd: &impl AnyIterableVec<I, T4>, exit: &Exit, ) -> Result<()>
Trait Implementations§
Source§impl<I, T> AnyCollectableVec for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
impl<I, T> AnyCollectableVec for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
Source§impl<I, T> AnyIterableVec<I, T> for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
impl<I, T> AnyIterableVec<I, T> for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
fn boxed_iter<'a>(&'a self) -> BoxedVecIterator<'a, I, T>where
I: StoredIndex,
T: StoredRaw + 'a,
fn iter<'a>(&'a self) -> BoxedVecIterator<'a, I, T>where
I: StoredIndex,
T: StoredRaw + 'a,
fn iter_at<'a>(&'a self, i: I) -> BoxedVecIterator<'a, I, T>where
I: StoredIndex,
T: StoredRaw + 'a,
fn iter_at_<'a>(&'a self, i: usize) -> BoxedVecIterator<'a, I, T>where
I: StoredIndex,
T: StoredRaw + 'a,
Source§impl<I, T> AnyStoredVec for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
impl<I, T> AnyStoredVec for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
fn db(&self) -> &Database
fn region_index(&self) -> usize
fn region(&self) -> &RwLock<Region>
fn header(&self) -> &Header
fn mut_header(&mut self) -> &mut Header
fn saved_stamped_changes(&self) -> u16
fn flush(&mut self) -> Result<()>
fn stored_len(&self) -> usize
fn real_stored_len(&self) -> usize
fn serialize_changes(&self) -> Result<Vec<u8>>
fn safe_flush(&mut self, exit: &Exit) -> Result<()>
fn update_stamp(&mut self, stamp: Stamp)
fn stamp(&self) -> Stamp
fn changes_path(&self) -> PathBuf
fn stamped_flush(&mut self, stamp: Stamp) -> Result<()>
Source§impl<I, T> AnyVec for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
impl<I, T> AnyVec for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
fn version(&self) -> Version
fn name(&self) -> &str
fn len(&self) -> usize
fn index_type_to_string(&self) -> &'static str
fn value_type_to_size_of(&self) -> usize
fn is_empty(&self) -> bool
fn etag(&self, stamp: Stamp, to: Option<i64>) -> String
fn i64_to_usize(&self, i: i64) -> usize
Source§impl<I, T> GenericStoredVec<I, T> for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
impl<I, T> GenericStoredVec<I, T> for EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
fn read_(&self, index: usize, reader: &Reader<'_>) -> Result<T>
fn pushed(&self) -> &[T]
fn mut_pushed(&mut self) -> &mut Vec<T>
fn holes(&self) -> &BTreeSet<usize>
fn mut_holes(&mut self) -> &mut BTreeSet<usize>
fn updated(&self) -> &BTreeMap<usize, T>
fn mut_updated(&mut self) -> &mut BTreeMap<usize, T>
fn truncate_if_needed(&mut self, index: I) -> Result<()>
fn reset(&mut self) -> Result<()>
const SIZE_OF_T: usize = _
Source§fn create_reader(&self) -> Reader<'_>
fn create_reader(&self) -> Reader<'_>
Be careful with deadlocks Read more
Source§fn create_static_reader(&self) -> Reader<'static>
fn create_static_reader(&self) -> Reader<'static>
Be careful with deadlocks Read more
fn unwrap_read(&self, index: I, reader: &Reader<'_>) -> T
fn unwrap_read_(&self, index: usize, reader: &Reader<'_>) -> T
fn read(&self, index: I, reader: &Reader<'_>) -> Result<T>
fn get_or_read( &self, index: I, reader: &Reader<'_>, ) -> Result<Option<Cow<'_, T>>>
fn get_or_read_( &self, index: usize, reader: &Reader<'_>, ) -> Result<Option<Cow<'_, T>>>
fn len_(&self) -> usize
fn pushed_len(&self) -> usize
fn push(&mut self, value: T)
fn push_if_needed(&mut self, index: I, value: T) -> Result<()>
fn forced_push_at(&mut self, index: I, value: T, exit: &Exit) -> Result<()>
fn update_or_push(&mut self, index: I, value: T) -> Result<()>
fn get_first_empty_index(&self) -> I
fn fill_first_hole_or_push(&mut self, value: T) -> Result<I>
fn take(&mut self, index: I, reader: &Reader<'_>) -> Result<Option<T>>
fn delete(&mut self, index: I)
fn update(&mut self, index: I, value: T) -> Result<()>
fn update_(&mut self, index: usize, value: T) -> Result<()>
fn reset_(&mut self) -> Result<()>
fn is_pushed_empty(&self) -> bool
fn has(&self, index: I) -> Result<bool>
fn has_(&self, index: usize) -> bool
fn truncate_if_needed_(&mut self, index: usize) -> Result<()>
fn truncate_if_needed_with_stamp( &mut self, index: I, stamp: Stamp, ) -> Result<()>
fn deserialize_then_undo_changes(&mut self, bytes: &[u8]) -> Result<()>
fn rollback_stamp(&mut self, stamp: Stamp) -> Result<()>
fn collect_holed(&self) -> Result<Vec<Option<T>>>
fn collect_holed_range( &self, from: Option<usize>, to: Option<usize>, ) -> Result<Vec<Option<T>>>
fn index_to_name(&self) -> String
fn vec_region_name(&self) -> String
fn vec_region_name_(name: &str) -> String
fn holes_region_name(&self) -> String
fn holes_region_name_(name: &str) -> String
Source§impl<'a, I, T> IntoIterator for &'a EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
impl<'a, I, T> IntoIterator for &'a EagerVec<I, T>where
I: StoredIndex,
T: StoredCompressed,
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>
impl<I, T> Sync for EagerVec<I, T>
impl<I, T> Unpin for EagerVec<I, T>
impl<I, T> !UnwindSafe for EagerVec<I, T>
Blanket Implementations§
Source§impl<I, T, U> AnyCloneableIterableVec<I, T> for Uwhere
U: 'static + AnyIterableVec<I, T> + Clone,
impl<I, T, U> AnyCloneableIterableVec<I, T> for Uwhere
U: 'static + AnyIterableVec<I, T> + Clone,
fn boxed_clone(&self) -> Box<dyn AnyCloneableIterableVec<I, T>>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T, V> CollectableVec<I, T> for V
impl<I, T, V> CollectableVec<I, T> for V
fn collect(&self) -> Result<Vec<T>>
fn collect_range( &self, from: Option<usize>, to: Option<usize>, ) -> Result<Vec<T>>
fn i64_to_usize_(i: i64, len: usize) -> usize
fn collect_signed_range( &self, from: Option<i64>, to: Option<i64>, ) -> Result<Vec<T>>
fn collect_range_serde_json( &self, from: Option<usize>, to: Option<usize>, ) -> Result<Vec<Value>>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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