Struct duniter_wotb::WebOfTrust [] [src]

pub struct WebOfTrust {
    pub max_cert: usize,
    // some fields omitted
}

Store a Web of Trust.

Allow to create/remove nodes and links between them.

It provides methods to find sentries nodes, find all paths between 2 nodes and to compute distances in the web.

Fields

Maxiumum amout of certifications a node can provide.

It can be changed afterward, and will be accounted for every future calculations.

In practice it should not change after initialization.

Methods

impl WebOfTrust
[src]

[src]

Create a new Web of Trust with the maxium certificications count.

[src]

Read WoT from file.

[src]

Write WoT to file.

[src]

Add a new node.

[src]

Remove given node if it exits.

[src]

Compute distance between a node and the network.

[src]

Get sentries array.

[src]

Get non sentries array.

[src]

Get disabled array.

[src]

Get paths from one node to the other.

[src]

Number of nodes in the WoT.

[src]

Tells if requested node is enabled (None if doesn't exist).

[src]

Set if a node is enabled.

Add link from a node to another.

Remove a link from a node to another.

Test if a link exist from a node to another.

[src]

Test if a node is outdistanced in the network.

Trait Implementations

impl Debug for WebOfTrust
[src]

[src]

Formats the value using the given formatter.

impl Clone for WebOfTrust
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more