pub struct DiscoveryCatalog<T = HeapDiscoveryCatalogTable>where
T: DiscoveryCatalogTable,{ /* private fields */ }Implementations§
Source§impl DiscoveryCatalog
impl DiscoveryCatalog
pub fn new() -> DiscoveryCatalog
Source§impl<T> DiscoveryCatalog<T>where
T: DiscoveryCatalogTable,
impl<T> DiscoveryCatalog<T>where
T: DiscoveryCatalogTable,
pub fn with_table(records: T) -> DiscoveryCatalog<T>
pub fn observe( &mut self, interface: DiscoveredInterface, ) -> Result<DiscoveryCatalogUpdate, DiscoveryCatalogStoreError>
pub fn restore( &mut self, seed: DiscoveryCatalogSeed, ) -> Result<(), DiscoveryCatalogRestoreError>
pub fn get(&self, id: DiscoveredInterfaceId) -> Option<&DiscoveryRecord>
pub fn records(&self) -> <T as DiscoveryCatalogTable>::Records<'_>
pub fn ranked_records(&self, now: InstantMillis) -> Vec<&DiscoveryRecord>
pub fn remove_expired(&mut self, now: InstantMillis) -> Vec<DiscoveryRecord>
pub fn remove_below_stamp_cost( &mut self, required: StampCost, ) -> Vec<DiscoveryRecord>
pub fn remove_blackholed( &mut self, identities: &[IdentityHash], ) -> Vec<DiscoveryRecord>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<T> Debug for DiscoveryCatalog<T>where
T: Debug + DiscoveryCatalogTable,
impl<T> Debug for DiscoveryCatalog<T>where
T: Debug + DiscoveryCatalogTable,
Source§impl<T> Default for DiscoveryCatalog<T>where
T: DiscoveryCatalogTable,
impl<T> Default for DiscoveryCatalog<T>where
T: DiscoveryCatalogTable,
Source§fn default() -> DiscoveryCatalog<T>
fn default() -> DiscoveryCatalog<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for DiscoveryCatalog<T>where
T: Freeze,
impl<T> RefUnwindSafe for DiscoveryCatalog<T>where
T: RefUnwindSafe,
impl<T> Send for DiscoveryCatalog<T>where
T: Send,
impl<T> Sync for DiscoveryCatalog<T>where
T: Sync,
impl<T> Unpin for DiscoveryCatalog<T>where
T: Unpin,
impl<T> UnsafeUnpin for DiscoveryCatalog<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DiscoveryCatalog<T>where
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