pub trait Cast<V>: AsVertex<V> {
    // Required method
    fn into_self(vertex: V) -> Self;
}
Expand description

Allow bidirectional conversions between a type V and the type implementing this trait.

Values of type V may be converted into the type implementing this trait, and values of the implementing type may be converted into V via the AsVertex<V> supertrait.

Required Methods§

source

fn into_self(vertex: V) -> Self

Convert a V into the type implementing this trait.

This is the inverse of AsVertex::into_vertex(): this function converts vertex: V into Self whereas AsVertex::into_vertex() can convert the resulting Self back into Some(v).

Object Safety§

This trait is not object safe.

Implementors§