Skip to main content

NetworkTopology

Trait NetworkTopology 

Source
pub trait NetworkTopology<V> {
    type Neighbors<'a>: Iterator<Item = V>
       where Self: 'a,
             V: 'a;

    // Required method
    fn neighbors(&self, node: &V) -> Self::Neighbors<'_>;
}
Expand description

Trait for network topology, used for cache invalidation traversal.

Required Associated Types§

Source

type Neighbors<'a>: Iterator<Item = V> where Self: 'a, V: 'a

Iterator over neighbors of a node.

Required Methods§

Source

fn neighbors(&self, node: &V) -> Self::Neighbors<'_>

Get neighbors of a node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<NodeName, I> NetworkTopology<NodeName> for SiteIndexNetwork<NodeName, I>
where NodeName: Clone + Hash + Eq + Send + Sync + Debug, I: IndexLike,

Implement NetworkTopology for SiteIndexNetwork.

This enables direct use of SiteIndexNetwork for cache invalidation and environment computation without needing adapter types like StaticTopology.

Source§

type Neighbors<'a> = Box<dyn Iterator<Item = NodeName> + 'a> where Self: 'a, NodeName: 'a