pub struct IndexedMap<'a, S: IndexedStore> { /* private fields */ }Implementations§
Source§impl<S: IndexedStore> IndexedMap<'_, S>
impl<S: IndexedStore> IndexedMap<'_, S>
pub fn export_current(&self) -> Result<IndexedSnapshotBundle, Error>
pub fn export_current_with_budget( &self, budget: &TransferBudget, ) -> Result<IndexedSnapshotBundle, Error>
pub fn import_current( &self, bundle: &IndexedSnapshotBundle, expected_source: Option<&MapVersionId>, ) -> Result<IndexedVersion, Error>
pub fn import_current_with_budget( &self, bundle: &IndexedSnapshotBundle, expected_source: Option<&MapVersionId>, budget: &TransferBudget, ) -> Result<IndexedVersion, Error>
Source§impl<'a, S: IndexedStore> IndexedMap<'a, S>
impl<'a, S: IndexedStore> IndexedMap<'a, S>
pub fn id(&self) -> &[u8] ⓘ
pub fn registry(&self) -> &SecondaryIndexRegistry
pub fn store_profile(&self) -> IndexedStoreProfile
pub fn source(&self) -> IndexedSourceView<'_, 'a, S>
pub fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Error>
pub fn get_with<R>( &self, key: &[u8], read: impl FnOnce(&[u8]) -> R, ) -> Result<Option<R>, Error>
pub fn health(&self) -> Result<IndexedMapHealth, Error>
pub fn metrics(&self) -> IndexedMapMetricsSnapshot
pub fn ensure_index( &self, name: impl AsRef<[u8]>, ) -> Result<IndexBuildResult, Error>
pub fn ensure_index_with_budget( &self, name: impl AsRef<[u8]>, budget: &MaintenanceBudget, ) -> Result<IndexBuildResult, Error>
pub fn apply(&self, mutations: Vec<Mutation>) -> Result<IndexedVersion, Error>
pub fn apply_with_budget( &self, mutations: Vec<Mutation>, budget: &MutationBudget, ) -> Result<IndexedVersion, Error>
pub fn apply_if( &self, expected: Option<&MapVersionId>, mutations: Vec<Mutation>, ) -> Result<IndexedMapUpdate, Error>
pub fn put( &self, key: impl Into<Vec<u8>>, value: impl Into<Vec<u8>>, ) -> Result<IndexedVersion, Error>
pub fn delete(&self, key: impl Into<Vec<u8>>) -> Result<IndexedVersion, Error>
pub fn edit( &self, edit: impl FnOnce(&mut IndexedMapEditor), ) -> Result<IndexedVersion, Error>
pub fn verify_index( &self, name: impl AsRef<[u8]>, source_version: &MapVersionId, ) -> Result<IndexVerification, Error>
pub fn verify_index_with_budget( &self, name: impl AsRef<[u8]>, source_version: &MapVersionId, budget: &MaintenanceBudget, ) -> Result<IndexVerification, Error>
pub fn verify_all( &self, source_version: &MapVersionId, ) -> Result<Vec<IndexVerification>, Error>
pub fn verify_all_with_budget( &self, source_version: &MapVersionId, budget: &MaintenanceBudget, ) -> Result<Vec<IndexVerification>, Error>
pub fn repair_index( &self, name: impl AsRef<[u8]>, source_version: &MapVersionId, ) -> Result<IndexVerification, Error>
pub fn repair_index_with_budget( &self, name: impl AsRef<[u8]>, source_version: &MapVersionId, budget: &MaintenanceBudget, ) -> Result<IndexVerification, Error>
pub fn replace_index( &self, name: impl AsRef<[u8]>, new_definition: SecondaryIndex, ) -> Result<IndexBuildResult, Error>
pub fn deactivate_index( &self, name: impl AsRef<[u8]>, ) -> Result<IndexedVersion, Error>
pub fn pin_snapshot<'map>( &'map self, pin_id: impl AsRef<[u8]>, source_version: &MapVersionId, ) -> Result<SnapshotPinGuard<'map, 'a, S>, Error>
pub fn retain_snapshot_pin( &self, pin_id: impl AsRef<[u8]>, source_version: &MapVersionId, ) -> Result<(), Error>
pub fn release_snapshot_pin( &self, pin_id: impl AsRef<[u8]>, ) -> Result<(), Error>
pub fn keep_last(&self, count: usize) -> Result<IndexedRetentionResult, Error>
Source§impl<S> IndexedMap<'_, S>
impl<S> IndexedMap<'_, S>
Source§impl<'a, S> IndexedMap<'a, S>where
S: IndexedStore,
impl<'a, S> IndexedMap<'a, S>where
S: IndexedStore,
Sourcepub fn snapshot(&self) -> Result<IndexedSnapshot<'a, S>, Error>
pub fn snapshot(&self) -> Result<IndexedSnapshot<'a, S>, Error>
Pin one canonical collection-state root and all immutable trees it names.
Sourcepub fn snapshot_at(
&self,
source_version: &MapVersionId,
) -> Result<IndexedSnapshot<'a, S>, Error>
pub fn snapshot_at( &self, source_version: &MapVersionId, ) -> Result<IndexedSnapshot<'a, S>, Error>
Reopen the retained canonical snapshot containing this source tree.
Sourcepub fn snapshot_by_id(
&self,
id: &IndexedSnapshotId,
) -> Result<IndexedSnapshot<'a, S>, Error>
pub fn snapshot_by_id( &self, id: &IndexedSnapshotId, ) -> Result<IndexedSnapshot<'a, S>, Error>
Reopen the exact retained content-addressed snapshot represented by id.
Auto Trait Implementations§
impl<'a, S> !Freeze for IndexedMap<'a, S>
impl<'a, S> !RefUnwindSafe for IndexedMap<'a, S>
impl<'a, S> !UnwindSafe for IndexedMap<'a, S>
impl<'a, S> Send for IndexedMap<'a, S>
impl<'a, S> Sync for IndexedMap<'a, S>
impl<'a, S> Unpin for IndexedMap<'a, S>
impl<'a, S> UnsafeUnpin for IndexedMap<'a, S>
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> 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