pub struct IndexedCollectionState {
pub source_map_id: Vec<u8>,
pub policy: CollectionIndexPolicy,
pub head: IndexedSnapshotId,
pub snapshots: BTreeMap<IndexedSnapshotId, IndexedSnapshotRecord>,
pub descriptors: BTreeMap<(Vec<u8>, Cid), IndexDescriptor>,
pub active: BTreeMap<Vec<u8>, Cid>,
pub retired: BTreeSet<(Vec<u8>, Cid)>,
pub pins: BTreeMap<Vec<u8>, SnapshotPin>,
}Expand description
Complete authoritative state for one managed indexed collection.
Fields§
§source_map_id: Vec<u8>§policy: CollectionIndexPolicy§head: IndexedSnapshotId§snapshots: BTreeMap<IndexedSnapshotId, IndexedSnapshotRecord>§descriptors: BTreeMap<(Vec<u8>, Cid), IndexDescriptor>§active: BTreeMap<Vec<u8>, Cid>§retired: BTreeSet<(Vec<u8>, Cid)>§pins: BTreeMap<Vec<u8>, SnapshotPin>Implementations§
Source§impl IndexedCollectionState
impl IndexedCollectionState
pub fn new( source_map_id: Vec<u8>, policy: CollectionIndexPolicy, head: IndexedSnapshotRecord, ) -> Result<Self, Error>
pub fn head_snapshot(&self) -> Result<&IndexedSnapshotRecord, Error>
pub fn validate_closure(&self) -> Result<(), Error>
pub fn to_tree<S: Store>(&self, prolly: &Prolly<S>) -> Result<Tree, Error>
pub fn from_tree<S: Store>( prolly: &Prolly<S>, tree: &Tree, ) -> Result<Self, Error>
Trait Implementations§
Source§impl Clone for IndexedCollectionState
impl Clone for IndexedCollectionState
Source§fn clone(&self) -> IndexedCollectionState
fn clone(&self) -> IndexedCollectionState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexedCollectionState
impl Debug for IndexedCollectionState
Source§impl PartialEq for IndexedCollectionState
impl PartialEq for IndexedCollectionState
impl StructuralPartialEq for IndexedCollectionState
Auto Trait Implementations§
impl Freeze for IndexedCollectionState
impl RefUnwindSafe for IndexedCollectionState
impl Send for IndexedCollectionState
impl Sync for IndexedCollectionState
impl Unpin for IndexedCollectionState
impl UnsafeUnpin for IndexedCollectionState
impl UnwindSafe for IndexedCollectionState
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<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