Enum routing::Authority [] [src]

pub enum Authority {
    ClientManager(XorName),
    NaeManager(XorName),
    NodeManager(XorName),
    ManagedNode(XorName),
    Client {
        client_key: PublicKey,
        peer_id: PeerId,
        proxy_node_name: XorName,
    },
}

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

An Authority can be an individual Client or ManagedNode, or a group of nodes, like a NodeManager, ClientManager or NaeManager.

Variants

ClientManager(XorName)

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

NaeManager(XorName)

Manager of a network-addressable element. XorName is the name of the element in question.

NodeManager(XorName)

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

ManagedNode(XorName)

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

Client

A Client.

Fields

client_key: PublicKey

The client's public signing key. The hash of this specifies the location of the Client in the network address space.

peer_id: PeerId

The Crust peer ID of the client.

proxy_node_name: XorName

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

Methods

impl Authority
[src]

fn is_group(&self) -> bool

Returns true if group authority, otherwise false.

fn name(&self) -> &XorName

Returns the name of authority.

fn to_destination(&self) -> Destination<XorName>

Returns the Destination for the RoutingTable.

Trait Implementations

impl Hash for Authority
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Clone for Authority
[src]

fn clone(&self) -> Authority

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Ord for Authority
[src]

fn cmp(&self, __arg_0: &Authority) -> Ordering

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

impl Eq for Authority
[src]

impl PartialOrd for Authority
[src]

fn partial_cmp(&self, __arg_0: &Authority) -> Option<Ordering>

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

fn lt(&self, __arg_0: &Authority) -> bool

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

fn le(&self, __arg_0: &Authority) -> bool

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

fn gt(&self, __arg_0: &Authority) -> bool

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

fn ge(&self, __arg_0: &Authority) -> bool

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

impl PartialEq for Authority
[src]

fn eq(&self, __arg_0: &Authority) -> bool

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

fn ne(&self, __arg_0: &Authority) -> bool

This method tests for !=.

impl Decodable for Authority
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Authority, __D::Error>

impl Encodable for Authority
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Debug for Authority
[src]

fn fmt(&self, formatter: &mut Formatter) -> Result

Formats the value using the given formatter.