Struct duniter_wotb::data::legacy::LegacyWebOfTrust [] [src]

pub struct LegacyWebOfTrust {
    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 LegacyWebOfTrust
[src]

[src]

Read WoT from file.

[src]

Write WoT to file.

Trait Implementations

impl Debug for LegacyWebOfTrust
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for LegacyWebOfTrust
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl WebOfTrust for LegacyWebOfTrust
[src]

[src]

Create a new Web of Trust with the maximum of links a node can issue.

Get the maximum number of links per user.

Set the maximum number of links per user.

[src]

Add a new node.

[src]

Remove the last node. Returns None if the WoT was empty, otherwise new top node id. Read more

[src]

Get the size of the WoT.

[src]

Check if given node is enabled. Returns None if this node doesn't exist. Read more

[src]

Set the enabled state of given node. Returns Null if this node doesn't exist, enabled otherwise. Read more

[src]

Get enabled node array.

[src]

Get disabled node array.

Try to add a link from the source to the target.

Try to remove a link from the source to the target.

Test if there is a link from the source to the target.

[src]

Test if a node is a sentry.

[src]

Get sentries array.

[src]

Get non sentries array.

Get the list of links source for this target. Returns None if this node doesn't exist. Read more

[src]

Get the number of issued links by a node. Returns None if this node doesn't exist. Read more

Auto Trait Implementations