pub struct RawVec<I, T> { /* private fields */ }Implementations§
Source§impl<I, T> RawVec<I, T>where
I: StoredIndex,
T: StoredType,
impl<I, T> RawVec<I, T>where
I: StoredIndex,
T: StoredType,
Sourcepub fn forced_import(path: &Path, version: Version) -> Result<Self>
pub fn forced_import(path: &Path, version: Version) -> Result<Self>
Same as import but will reset the folder under certain errors, so be careful !
pub fn import(path: &Path, version: Version) -> Result<Self>
pub fn iter(&self) -> RawVecIterator<'_, I, T> ⓘ
pub fn iter_at(&self, i: I) -> RawVecIterator<'_, I, T> ⓘ
pub fn iter_at_(&self, i: usize) -> RawVecIterator<'_, I, T> ⓘ
Trait Implementations§
Source§impl<I, T> AnyCollectableVec for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
impl<I, T> AnyCollectableVec for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
Source§impl<I, T> AnyIterableVec<I, T> for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
impl<I, T> AnyIterableVec<I, T> for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
fn boxed_iter<'a>(&'a self) -> BoxedVecIterator<'a, I, T>where
T: 'a,
fn iter<'a>(&'a self) -> BoxedVecIterator<'a, I, T>where
I: StoredIndex,
T: StoredType + 'a,
fn iter_at<'a>(&'a self, i: I) -> BoxedVecIterator<'a, I, T>where
I: StoredIndex,
T: StoredType + 'a,
fn iter_at_<'a>(&'a self, i: usize) -> BoxedVecIterator<'a, I, T>where
I: StoredIndex,
T: StoredType + 'a,
Source§impl<I, T> AnyVec for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
impl<I, T> AnyVec for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
Source§impl<I, T> GenericStoredVec<I, T> for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
impl<I, T> GenericStoredVec<I, T> for RawVec<I, T>where
I: StoredIndex,
T: StoredType,
fn read_(&self, index: usize, mmap: &Mmap) -> Result<Option<T>>
fn mmap(&self) -> &ArcSwap<Mmap>
fn stored_len(&self) -> usize
fn pushed(&self) -> &[T]
fn mut_pushed(&mut self) -> &mut Vec<T>
fn path(&self) -> &Path
fn flush(&mut self) -> Result<()>
fn truncate_if_needed(&mut self, index: I) -> Result<()>
const SIZE_OF_T: usize = _
fn read(&self, index: I, mmap: &Mmap) -> Result<Option<T>>
fn get_or_read(&self, index: I, mmap: &Mmap) -> Result<Option<Value<'_, T>>>
fn get_or_read_( &self, index: usize, mmap: &Mmap, ) -> Result<Option<Value<'_, T>>>
fn len_(&self) -> usize
fn pushed_len(&self) -> usize
fn push(&mut self, value: T)
fn open_file(&self) -> Result<File>
fn open_file_(path: &Path) -> Result<File>
fn file_set_len(&mut self, len: u64) -> Result<()>
fn file_set_len_(file: &mut File, len: u64) -> Result<()>
fn file_write_all(&mut self, buf: &[u8]) -> Result<()>
fn file_truncate_and_write_all(&mut self, len: u64, buf: &[u8]) -> Result<()>
fn reset(&mut self) -> Result<()>
fn new_mmap(file: File) -> Result<Arc<Mmap>>
fn update_mmap(&mut self, file: File) -> Result<()>
fn is_pushed_empty(&self) -> bool
fn has(&self, index: I) -> Result<bool>
fn has_(&self, index: usize) -> bool
fn path_vec(&self) -> PathBuf
fn path_vec_(path: &Path) -> PathBuf
fn path_version_(path: &Path) -> PathBuf
fn path_compressed_(path: &Path) -> PathBuf
fn name_(&self) -> String
fn modified_time_(&self) -> Result<Duration>
Source§impl<'a, I, T> IntoIterator for &'a RawVec<I, T>where
I: StoredIndex,
T: StoredType,
impl<'a, I, T> IntoIterator for &'a RawVec<I, T>where
I: StoredIndex,
T: StoredType,
Auto Trait Implementations§
impl<I, T> Freeze for RawVec<I, T>
impl<I, T> RefUnwindSafe for RawVec<I, T>where
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, T> Send for RawVec<I, T>
impl<I, T> Sync for RawVec<I, T>
impl<I, T> Unpin for RawVec<I, T>
impl<I, T> UnwindSafe for RawVec<I, T>where
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
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, U> CloneableAnyIterableVec<I, T> for Uwhere
U: 'static + AnyIterableVec<I, T> + Clone,
impl<I, T, U> CloneableAnyIterableVec<I, T> for Uwhere
U: 'static + AnyIterableVec<I, T> + Clone,
fn boxed_clone(&self) -> Box<dyn CloneableAnyIterableVec<I, T>>
Source§impl<I, T, V> CollectableVec<I, T> for V
impl<I, T, V> CollectableVec<I, T> for V
fn collect_range( &self, from: Option<usize>, to: Option<usize>, ) -> Result<Vec<T>>
fn i64_to_usize(i: i64, len: usize) -> usize
fn range_count(from: Option<i64>, to: Option<i64>, len: usize) -> usize
fn collect_range_serde_json( &self, from: Option<i64>, to: Option<i64>, ) -> 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