Skip to main content

DiscoveryCatalogTable

Trait DiscoveryCatalogTable 

Source
pub trait DiscoveryCatalogTable: Default {
    type Records<'a>: Iterator<Item = &'a DiscoveryRecord>
       where Self: 'a;

    // Required methods
    fn len(&self) -> usize;
    fn get(&self, id: DiscoveredInterfaceId) -> Option<&DiscoveryRecord>;
    fn get_mut(
        &mut self,
        id: DiscoveredInterfaceId,
    ) -> Option<&mut DiscoveryRecord>;
    fn try_insert(
        &mut self,
        id: DiscoveredInterfaceId,
        record: DiscoveryRecord,
    ) -> Result<Option<DiscoveryRecord>, TablePushError>;
    fn remove(&mut self, id: DiscoveredInterfaceId) -> Option<DiscoveryRecord>;
    fn records(&self) -> Self::Records<'_>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Associated Types§

Source

type Records<'a>: Iterator<Item = &'a DiscoveryRecord> where Self: 'a

Required Methods§

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§