Indexed

Trait Indexed 

Source
pub trait Indexed<T: RawIndex> {
    type Idx<I>;

    // Required method
    fn index(&self) -> &Self::Idx<T>;
}
Expand description

Indexed describes a common interface for all types which are aware of some associated index. The trait is generic over a type T which implements the RawIndex trait, allowing for flexibility in the type of index used while ensuring that the index type is compatible with the hypergraph’s indexing system.

Required Associated Types§

Source

type Idx<I>

Required Methods§

Source

fn index(&self) -> &Self::Idx<T>

Returns the index of the 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<T, Idx> Indexed<Idx> for Node<T, Idx>
where Idx: RawIndex,

Source§

type Idx<I> = IndexBase<I>

Source§

impl<T: RawIndex> Indexed<T> for VertexId<T>

Source§

type Idx<I> = IndexBase<I>