Struct freebsd_geom::Graph[][src]

pub struct Graph {
    pub nodes: BTreeMap<NodeId, Geom>,
    pub edges: BTreeMap<EdgeId, Edge>,
    pub outedges: BTreeMap<NodeId, Vec<EdgeId>>,
    pub inedges: BTreeMap<NodeId, Vec<EdgeId>>,
}

A geom::Graph represents a snapshot of the GEOM state of a FreeBSD instance.

(Math jargon: It is actually a “forest” of disconnected components, rather than a “graph,” and those components form “trees.”)

Fields

nodes: BTreeMap<NodeId, Geom>

Contains all of the Geoms in the forest

edges: BTreeMap<EdgeId, Edge>

Contains all of the Edges in the forest

outedges: BTreeMap<NodeId, Vec<EdgeId>>

Represents the out-edges of each Geom, by id

inedges: BTreeMap<NodeId, Vec<EdgeId>>

Represents the in-edges of each Geom, by id

Implementations

impl Graph[src]

pub fn roots_iter(&self) -> RootsIter<'_>[src]

Returns an Iterator which yields each (&NodeId, &Geom) for roots (i.e., rank 1).

pub fn child_edgeids_iter(&self, id: &NodeId) -> ChildEdgeIdsIter<'_>[src]

Given the NodeId of a Geom, returns an Iterator which yields each EdgeId descending from the node.

pub fn child_edges_iter(&self, id: &NodeId) -> ChildEdgesIter<'_>[src]

Given the NodeId of a Geom, returns an Iterator which yields each (&EdgeId, &Edge) descending from the node.

pub fn child_geoms_iter(&self, id: &NodeId) -> ChildGeomsIter<'_>[src]

Given the NodeId of a Geom, returns an Iterator which yields each (&EdgeId, &Edge, &Geom) descending from the node.

pub fn descendents_iter<'a>(
    &'a self,
    id: &NodeId
) -> Box<dyn Iterator<Item = (&'a EdgeId, &'a Edge, &'a Geom)> + 'a>
[src]

Given the NodeId of a Geom, iterate every Geom descending from it.

Trait Implementations

impl Debug for Graph[src]

Auto Trait Implementations

impl RefUnwindSafe for Graph

impl Send for Graph

impl Sync for Graph

impl Unpin for Graph

impl UnwindSafe for Graph

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.