[][src]Module cjdns_core::splice

Routing label splice/unsplice routines.

Enums

SpliceError

Routing label splice failure.

Functions

build_label

This will construct a label using an array representation of a path (path_hops). If any label along the path needs to be re-encoded, it will be.

get_encoding_form

Get the encoding form used for the first director of the RoutingLabel. It also returns index of found form in scheme. Recall an encoding scheme is one or more encoding forms. If the label is not recognized as using the given scheme then it'll return Err(Error::CannotFindForm).

is_one_hop

Tests if a label contains only one hop.

re_encode

Re-encode a label to the encoding form specified by desired_form_num (or canonical if None).

routes_through

This will return true if the node at the end of the route given by mid_path is a hop along the path given by destination.

splice

This function takes one or more RoutingLabels and splices them to create a resulting label.

unsplice

Convert a full path to a representation which a node along that path can use.

Type Definitions

Result

Result type alias.