GraphProps

Trait GraphProps 

Source
pub trait GraphProps:
    'static
    + Copy
    + Send
    + Sync {
    type Ix: RawIndex;
    type Kind: GraphType;

    // Required method
    fn new() -> Self;

    // Provided methods
    fn phantom() -> PhantomData<(Self::Kind, Self::Ix)> { ... }
    fn into_phantom(self) -> PhantomData<(Self::Kind, Self::Ix)> { ... }
    fn is_directed(&self) -> bool { ... }
    fn is_undirected(&self) -> bool { ... }
    fn mode(&self) -> Mode { ... }
}
Expand description

The GraphProps trait abstracts several generic types used to define a hyper graph into a single entity.

Required Associated Types§

Required Methods§

Source

fn new() -> Self

returns a new instance of the graph attributes.

Provided Methods§

Source

fn phantom() -> PhantomData<(Self::Kind, Self::Ix)>

returns a PhantomData instance of the graph attributes.

Source

fn into_phantom(self) -> PhantomData<(Self::Kind, Self::Ix)>

convert the current attributes into a PhantomData instance.

Source

fn is_directed(&self) -> bool

returns true if the attributes are directed.

Source

fn is_undirected(&self) -> bool

returns true if the attributes are undirected.

Source

fn mode(&self) -> Mode

returns the Mode of the graph

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.

Implementations on Foreign Types§

Source§

impl<I, K> GraphProps for (PhantomData<I>, PhantomData<K>)
where I: RawIndex, K: GraphType,

Source§

type Ix = I

Source§

type Kind = K

Source§

fn new() -> Self

Source§

impl<I, K> GraphProps for PhantomData<(K, I)>
where I: RawIndex, K: GraphType,

Source§

type Ix = I

Source§

type Kind = K

Source§

fn new() -> Self

Implementors§

Source§

impl<I, K> GraphProps for Attrs<I, K>
where I: RawIndex, K: GraphType,

Source§

type Ix = I

Source§

type Kind = K