Trait petgraph::visit::NodeRef

source ·
pub trait NodeRef: Copy {
    type NodeId;
    type Weight;

    // Required methods
    fn id(&self) -> Self::NodeId;
    fn weight(&self) -> &Self::Weight;
}
Expand description

A node reference.

Required Associated Types§

Required Methods§

source

fn id(&self) -> Self::NodeId

source

fn weight(&self) -> &Self::Weight

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, Id, W> NodeRef for (Id, &'a W)
where Id: Copy,

§

type NodeId = Id

§

type Weight = W

source§

fn id(&self) -> Self::NodeId

source§

fn weight(&self) -> &Self::Weight

source§

impl<Id> NodeRef for (Id, ())
where Id: Copy,

§

type NodeId = Id

§

type Weight = ()

source§

fn id(&self) -> Self::NodeId

source§

fn weight(&self) -> &Self::Weight

Implementors§