GenericStoredVec

Trait GenericStoredVec 

Source
pub trait GenericStoredVec<I, T>: Send + Sync
where Self: AnyStoredVec, I: StoredIndex, T: StoredRaw,
{ const SIZE_OF_T: usize = _;
Show 65 methods // Required methods fn read_(&self, index: usize, reader: &Reader<'_>) -> Result<T>; fn prev_pushed(&self) -> &[T]; fn mut_prev_pushed(&mut self) -> &mut Vec<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 prev_holes(&self) -> &BTreeSet<usize>; fn mut_prev_holes(&mut self) -> &mut BTreeSet<usize>; fn updated(&self) -> &BTreeMap<usize, T>; fn mut_updated(&mut self) -> &mut BTreeMap<usize, T>; fn prev_updated(&self) -> &BTreeMap<usize, T>; fn mut_prev_updated(&mut self) -> &mut BTreeMap<usize, T>; fn reset(&mut self) -> Result<()>; fn prev_stored_len(&self) -> usize; fn mut_prev_stored_len(&mut self) -> &mut usize; // Provided methods fn create_reader(&self) -> Reader<'_> { ... } fn create_static_reader(&self) -> Reader<'static> { ... } fn unwrap_read(&self, index: I, reader: &Reader<'_>) -> T { ... } fn unwrap_read_(&self, index: usize, reader: &Reader<'_>) -> T { ... } fn one_shot_read(&self, index: I) -> Result<T> { ... } fn read(&self, index: I, reader: &Reader<'_>) -> Result<T> { ... } fn one_shot_read_(&self, index: usize) -> Result<T> { ... } fn get_any_or_read( &self, index: I, reader: &Reader<'_>, ) -> Result<Option<T>> { ... } fn get_any_or_read_( &self, index: usize, reader: &Reader<'_>, ) -> Result<Option<T>> { ... } fn one_shot_get_pushed_or_read(&self, index: I) -> Result<Option<T>> { ... } fn get_pushed_or_read( &self, index: I, reader: &Reader<'_>, ) -> Result<Option<T>> { ... } fn one_shot_get_pushed_or_read_(&self, index: usize) -> Result<Option<T>> { ... } fn get_pushed_or_read_( &self, index: usize, reader: &Reader<'_>, ) -> Result<Option<T>> { ... } fn get_pushed(&self, index: usize, stored_len: usize) -> Option<&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 forced_push_at_( &mut self, index: usize, 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 validate_computed_version_or_reset( &mut self, version: Version, ) -> Result<()> { ... } fn is_pushed_empty(&self) -> bool { ... } fn has(&self, index: I) -> bool { ... } fn has_(&self, index: usize) -> bool { ... } fn truncate_if_needed(&mut self, index: I) -> Result<()> { ... } 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 stamped_flush_maybe_with_changes( &mut self, stamp: Stamp, with_changes: bool, ) -> Result<()> { ... } fn changes_path(&self) -> PathBuf { ... } fn stamped_flush_with_changes(&mut self, stamp: Stamp) -> Result<()> { ... } fn rollback_before(&mut self, stamp: Stamp) -> Result<Stamp> { ... } fn is_dirty(&mut self) -> bool { ... } fn rollback(&mut self) -> Result<()> { ... } fn reset_unsaved(&mut self) { ... } fn collect_holed(&self) -> Result<Vec<Option<T>>> { ... } fn collect_holed_range( &self, from: Option<usize>, to: Option<usize>, ) -> Result<Vec<Option<T>>> { ... } 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 { ... }
}

Provided Associated Constants§

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn prev_stored_len(&self) -> usize

Source

fn mut_prev_stored_len(&mut self) -> &mut usize

Provided Methods§

Source

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

Be careful with deadlocks

You’ll want to drop the reader before mutable ops

Source

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

Be careful with deadlocks

You’ll want to drop the reader before mutable ops

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn len_(&self) -> usize

Source

fn pushed_len(&self) -> usize

Source

fn push(&mut self, value: T)

Source

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

Source

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

Source

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

Source

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

Source

fn get_first_empty_index(&self) -> I

Source

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

Source

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

Source

fn delete(&mut self, index: I)

Source

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

Source

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

Source

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

Source

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

Source

fn is_pushed_empty(&self) -> bool

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn changes_path(&self) -> PathBuf

Source

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

Source

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

Source

fn is_dirty(&mut self) -> bool

Source

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

Source

fn reset_unsaved(&mut self)

Source

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

Source

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

Source

fn vec_region_name(&self) -> String

Source

fn vec_region_name_(name: &str) -> String

Source

fn holes_region_name(&self) -> String

Source

fn holes_region_name_(name: &str) -> String

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I, T> GenericStoredVec<I, T> for StoredVec<I, T>

Source§

impl<I, T> GenericStoredVec<I, T> for CompressedVec<I, T>

Source§

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

Source§

impl<I, T> GenericStoredVec<I, T> for RawVec<I, T>
where I: StoredIndex, T: StoredRaw,