Enum routing::Authority [] [src]

pub enum Authority<N: Xorable + Clone + Copy + Binary + Default> {
    ClientManager(N),
    NaeManager(N),
    NodeManager(N),
    Section(N),
    PrefixSection(Prefix<N>),
    ManagedNode(N),
    Client {
        client_id: PublicId,
        proxy_node_name: N,
    },
}

An entity that can act as a source or destination of a message.

Client and ManagedNode are single-node authorities (i.e. no verification of messages from additional sources needed); other authorities require agreement by a quorum of some set. NodeManager, ClientManager and NaeManager use group verification of messages: they require quorum agreement from the group of nodes closest to the source, while Section and PrefixSection use section verification: the set from which a quorum is required is all members of the section (Section) or of all sections matching the prefix (PrefixSection).

Variants

Manager of a Client. XorName is the hash of the Client's client_key.

Manager of a network-addressable element, i.e. the group matching this name. XorName is the name of the element in question.

Manager of a ManagedNode. XorName is that of the ManagedNode.

A set of nodes with names sharing a common prefix.

A set of nodes with names sharing a common prefix - may span multiple Sections present in the routing table or only a part of a Section

A non-client node (i.e. a vault) which is managed by NodeManagers. XorName is provided by the network relocation process immediately after bootstrapping.

A Client.

Fields of Client

The Public ID of the client.

The name of the single ManagedNode which the Client connects to and proxies all messages through.

Methods

impl<N: Xorable + Clone + Copy + Binary + Default> Authority<N>
[src]

[src]

Returns true if the authority consists of multiple nodes, otherwise false.

[src]

Returns true if the authority is a single node, and false otherwise.

[src]

Returns true if a client, false if a node or section.

[src]

Returns the name of authority.

Trait Implementations

impl<N: PartialEq + Xorable + Clone + Copy + Binary + Default> PartialEq for Authority<N>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<N: PartialOrd + Xorable + Clone + Copy + Binary + Default> PartialOrd for Authority<N>
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<N: Eq + Xorable + Clone + Copy + Binary + Default> Eq for Authority<N>
[src]

impl<N: Ord + Xorable + Clone + Copy + Binary + Default> Ord for Authority<N>
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl<N: Clone + Xorable + Clone + Copy + Binary + Default> Clone for Authority<N>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Copy + Xorable + Clone + Copy + Binary + Default> Copy for Authority<N>
[src]

impl<N: Hash + Xorable + Clone + Copy + Binary + Default> Hash for Authority<N>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<N: Xorable + Clone + Copy + Binary + Default + Display> Debug for Authority<N>
[src]

[src]

Formats the value using the given formatter.