Struct urbit_http_api::graph::Node[][src]

pub struct Node {
    pub index: String,
    pub author: String,
    pub time_sent: u64,
    pub signatures: Vec<Signature>,
    pub contents: NodeContents,
    pub hash: Option<String>,
    pub children: Vec<Node>,
}
Expand description

Struct which represents a node in a graph in Graph Store

Fields

index: Stringauthor: Stringtime_sent: u64signatures: Vec<Signature>contents: NodeContentshash: Option<String>children: Vec<Node>

Implementations

Extract the node’s final section (after the last /) of the index

Extract the Node’s parent’s index (if parent exists)

Check if a self is the direct parent of another Node.

Check if self is a parent (direct or indirect) of another Node

Creates a copy of self and searches through the children to find the deepest depth which the new_child can be placed.

Formats the time_sent field to be human readable date-time in UTC

Converts to JsonValue creates a json object with one field: key = the node’s full index path, value = json representation of node

Convert from node JsonValue which is wrapped up in a few wrapper fields into a Node, with children if they exist.

Convert from straight node JsonValue to Node

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more