Struct urbit_http_api::graph::Graph[][src]

pub struct Graph {
    pub nodes: Vec<Node>,
}

Struct which represents a graph in Graph Store as a list of Nodes. Simplistic implementation may be updated in the future if performance becomes inadequate in real world use cases.

Fields

nodes: Vec<Node>

List of nodes structured as a graph with children

Implementations

impl Graph[src]

pub fn new(nodes: Vec<Node>) -> Graph[src]

Create a new Graph

pub fn insert(&mut self, node: Node)[src]

Insert a Node into the top level of the Graph.

pub fn find_node_parent(&self, child: &Node) -> Option<&Node>[src]

Attempts to find the parent of a given node within self with a naive linear search.

pub fn from_json(graph_json: JsonValue) -> Result<Graph>[src]

Convert from graph JsonValue to Graph

pub fn to_json(&self) -> JsonValue[src]

Trait Implementations

impl Clone for Graph[src]

impl Debug for Graph[src]

Auto Trait Implementations

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,