Skip to main content

DiscoveredConnectionTable

Trait DiscoveredConnectionTable 

Source
pub trait DiscoveredConnectionTable: Default {
    type Connections<'a>: Iterator<Item = &'a ActiveDiscoveredInterface>
       where Self: 'a;

    // Required methods
    fn len(&self) -> usize;
    fn get_mut(
        &mut self,
        interface: InterfaceId,
    ) -> Option<&mut ActiveDiscoveredInterface>;
    fn contains_interface(&self, interface: InterfaceId) -> bool;
    fn contains_endpoint(
        &self,
        endpoint: DiscoveredConnectionEndpointId,
    ) -> bool;
    fn try_insert(
        &mut self,
        interface: ActiveDiscoveredInterface,
    ) -> Result<Option<ActiveDiscoveredInterface>, TablePushError>;
    fn remove(
        &mut self,
        interface: InterfaceId,
    ) -> Option<ActiveDiscoveredInterface>;
    fn connections(&self) -> Self::Connections<'_>;

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

Required Associated Types§

Source

type Connections<'a>: Iterator<Item = &'a ActiveDiscoveredInterface> 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§