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§
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 Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".