Trait Topology

Source
pub trait Topology {
    type Path;

    // Required method
    fn shortest_path(self, to: Self) -> Self::Path;
}
Expand description

Main trait for topological spaces.

The associated type Path should implement as many traits as possible which allows to implement other traits trivially.

  • Length -> QuasiMetric
  • Merge -> Connected

Required Associated Types§

Source

type Path

The type of paths in this space. Usually [Self,Self].

Required Methods§

Source

fn shortest_path(self, to: Self) -> Self::Path

Function which returns the shortest path between self as start point and to as end point.

Often this returns a line are something equivalent from self to to.

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§