pub struct PersistentDomainRecordStore { /* private fields */ }Implementations§
Source§impl PersistentDomainRecordStore
impl PersistentDomainRecordStore
pub fn from_records( records: BTreeMap<DomainRecordRef, DomainRecord>, ) -> Result<Self, CanwuError>
pub fn get(&self, reference: &DomainRecordRef) -> Option<&DomainRecord>
pub fn contains_key(&self, reference: &DomainRecordRef) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&DomainRecordRef, &DomainRecord)>
pub fn values(&self) -> impl Iterator<Item = &DomainRecord>
pub fn roots(&self) -> &DomainRecordCommitmentRoots
Sourcepub const fn primary_leaf_count(&self) -> usize
pub const fn primary_leaf_count(&self) -> usize
Number of canonical primary leaves. It is independent of insertion order and is useful for preflight budgets before a cold page is loaded.
pub fn materialize(&self) -> BTreeMap<DomainRecordRef, DomainRecord>
pub fn state_pages( &self, ) -> Result<(DomainRecordPageRoots, Vec<StatePageBlob>), CanwuError>
Sourcepub fn missing_state_pages(
&self,
provider: &dyn StatePageProvider,
) -> Result<(DomainRecordPageRoots, Vec<StatePageBlob>), CanwuError>
pub fn missing_state_pages( &self, provider: &dyn StatePageProvider, ) -> Result<(DomainRecordPageRoots, Vec<StatePageBlob>), CanwuError>
Emits only page paths whose content addresses are not already present. An existing node page is a closure boundary: its child page identities are committed by its bytes and were retained with that prior root.
pub fn primary_metrics(&self) -> PatriciaStoreMetrics
pub fn from_state_pages( roots: &DomainRecordPageRoots, provider: &dyn StatePageProvider, ) -> Result<Self, CanwuError>
Trait Implementations§
Source§impl Clone for PersistentDomainRecordStore
impl Clone for PersistentDomainRecordStore
Auto Trait Implementations§
impl Freeze for PersistentDomainRecordStore
impl RefUnwindSafe for PersistentDomainRecordStore
impl Send for PersistentDomainRecordStore
impl Sync for PersistentDomainRecordStore
impl Unpin for PersistentDomainRecordStore
impl UnsafeUnpin for PersistentDomainRecordStore
impl UnwindSafe for PersistentDomainRecordStore
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