[][src]Trait bigraph::OptionalGraphIndex

pub trait OptionalGraphIndex<PartnerGraphIndex>: Eq + Ord + Into<Option<PartnerGraphIndex>> + From<usize> + From<Option<usize>> + From<PartnerGraphIndex> + From<Option<PartnerGraphIndex>> + Default + Copy + Add<usize, Output = Self> + Debug where
    PartnerGraphIndex: GraphIndex<Self>, 
{ fn as_usize(self) -> Option<usize>;
fn as_usize_unchecked(self) -> usize; fn is_valid(self) -> bool { ... }
fn new_none() -> Self { ... } }

Required methods

fn as_usize(self) -> Option<usize>

Get this index as usize, but return None if this index is marked as invalid.

fn as_usize_unchecked(self) -> usize

A faster method to get the usize value of the index, which does not perform any validity checks.

Loading content...

Provided methods

fn is_valid(self) -> bool

Returns true if the index is valid, i.e. if it is not marked as invalid.

fn new_none() -> Self

Returns a new OptionalGraphIndex that is marked as invalid.

Loading content...

Implementors

impl<IndexType> OptionalGraphIndex<EdgeIndex<IndexType>> for OptionalEdgeIndex<IndexType> where
    IndexType: PrimInt
[src]

impl<IndexType> OptionalGraphIndex<NodeIndex<IndexType>> for OptionalNodeIndex<IndexType> where
    IndexType: PrimInt
[src]

Loading content...