[][src]Struct libojo::Graggle

pub struct Graggle<'a> { /* fields omitted */ }

A graggle is like a file, except that its lines are not necessarily in a linear order (rather, they form a directed graph).

This is a read-only view into a graggle. It implements Graph, so you may apply graph-based algorithms on it.

Note that lines in a graggle may be either live or deleted (nodes that are ``deleted'' are not actually removed, but they are simply marked as being deleted). Some of the methods on Graggle ignore the deleted lines, while others expose them.

Methods

impl<'a> Graggle<'a>[src]

pub fn nodes(self) -> impl Iterator<Item = NodeId> + 'a[src]

Returns an iterator over all live nodes of this graggle.

pub fn out_edges(self, node: &NodeId) -> impl Iterator<Item = &'a Edge> + 'a[src]

Returns an iterator over all edges pointing from node to another live node.

pub fn out_neighbors(
    self,
    node: &NodeId
) -> impl Iterator<Item = &'a NodeId> + 'a
[src]

Returns an iterator over all live out-neighbors of node.

pub fn in_neighbors(
    self,
    node: &NodeId
) -> impl Iterator<Item = &'a NodeId> + 'a
[src]

Returns an iterator over all live in-neighbors of node.

pub fn all_out_edges(self, node: &NodeId) -> impl Iterator<Item = &'a Edge> + 'a[src]

Returns an iterator over all edges pointing out of node, including those that point to deleted edges.

pub fn in_edges(self, node: &NodeId) -> impl Iterator<Item = &'a Edge> + 'a[src]

Returns an iterator over all backwards edges pointing from node to another live node.

pub fn all_in_edges(self, node: &NodeId) -> impl Iterator<Item = &'a Edge> + 'a[src]

Returns an iterator over all backwards edges pointing out of node, including those that point to deleted edges.

pub fn has_node(self, node: &NodeId) -> bool[src]

Returns true if node belongs to this graggle (whether it is live or deleted).

pub fn is_live(self, node: &NodeId) -> bool[src]

Returns true if node is live.

Panics

Panics unless node belongs to this graggle.

pub fn as_live_graph(self) -> LiveGraph<'a>[src]

Wraps self in LiveGraph, which implements [graph::Graph] over the live nodes of this graggle.

pub fn as_full_graph(self) -> FullGraph<'a>[src]

Wraps self in FullGraph, which implements [graph::Graph] over all (live and deleted) nodes of this graggle.

Trait Implementations

impl<'a> Clone for Graggle<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Copy for Graggle<'a>[src]

impl<'a> Debug for Graggle<'a>[src]

Auto Trait Implementations

impl<'a> Send for Graggle<'a>

impl<'a> Sync for Graggle<'a>

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<N> Edge for N where
    N: Copy
[src]

impl<T> Same for T

type Output = T

Should always be Self