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
ClientManager(N)
Manager of a Client. XorName is the hash of the Client's client_key
.
NaeManager(N)
Manager of a network-addressable element, i.e. the group matching this name.
XorName
is the name of the element in question.
NodeManager(N)
Manager of a ManagedNode. XorName is that of the ManagedNode.
Section(N)
A set of nodes with names sharing a common prefix.
PrefixSection(Prefix<N>)
A set of nodes with names sharing a common prefix - may span multiple Section
s present in
the routing table or only a part of a Section
ManagedNode(N)
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 of Client
client_id: PublicId | The Public ID of the client. |
proxy_node_name: N | 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]
impl<N: Xorable + Clone + Copy + Binary + Default> Authority<N>
pub fn is_multiple(&self) -> bool
[src]
pub fn is_multiple(&self) -> bool
Returns true
if the authority consists of multiple nodes, otherwise false
.
pub fn is_single(&self) -> bool
[src]
pub fn is_single(&self) -> bool
Returns true
if the authority is a single node, and false
otherwise.
pub fn is_client(&self) -> bool
[src]
pub fn is_client(&self) -> bool
Returns true
if a client, false
if a node or section.
pub fn name(&self) -> N
[src]
pub fn name(&self) -> N
Returns the name of authority.
Trait Implementations
impl<N: PartialEq + Xorable + Clone + Copy + Binary + Default> PartialEq for Authority<N>
[src]
impl<N: PartialEq + Xorable + Clone + Copy + Binary + Default> PartialEq for Authority<N>
fn eq(&self, other: &Authority<N>) -> bool
[src]
fn eq(&self, other: &Authority<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Authority<N>) -> bool
[src]
fn ne(&self, other: &Authority<N>) -> bool
This method tests for !=
.
impl<N: PartialOrd + Xorable + Clone + Copy + Binary + Default> PartialOrd for Authority<N>
[src]
impl<N: PartialOrd + Xorable + Clone + Copy + Binary + Default> PartialOrd for Authority<N>
fn partial_cmp(&self, other: &Authority<N>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Authority<N>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Authority<N>) -> bool
[src]
fn lt(&self, other: &Authority<N>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Authority<N>) -> bool
[src]
fn le(&self, other: &Authority<N>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Authority<N>) -> bool
[src]
fn gt(&self, other: &Authority<N>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Authority<N>) -> bool
[src]
fn ge(&self, other: &Authority<N>) -> bool
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: Eq + Xorable + Clone + Copy + Binary + Default> Eq for Authority<N>
impl<N: Ord + Xorable + Clone + Copy + Binary + Default> Ord for Authority<N>
[src]
impl<N: Ord + Xorable + Clone + Copy + Binary + Default> Ord for Authority<N>
fn cmp(&self, other: &Authority<N>) -> Ordering
[src]
fn cmp(&self, other: &Authority<N>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<N: Clone + Xorable + Clone + Copy + Binary + Default> Clone for Authority<N>
[src]
impl<N: Clone + Xorable + Clone + Copy + Binary + Default> Clone for Authority<N>
fn clone(&self) -> Authority<N>
[src]
fn clone(&self) -> Authority<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N: Copy + Xorable + Clone + Copy + Binary + Default> Copy for Authority<N>
[src]
impl<N: Copy + Xorable + Clone + Copy + Binary + Default> Copy for Authority<N>
impl<N: Hash + Xorable + Clone + Copy + Binary + Default> Hash for Authority<N>
[src]
impl<N: Hash + Xorable + Clone + Copy + Binary + Default> Hash for Authority<N>
fn hash<__HN: Hasher>(&self, state: &mut __HN)
[src]
fn hash<__HN: Hasher>(&self, state: &mut __HN)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
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]
impl<N: Xorable + Clone + Copy + Binary + Default + Display> Debug for Authority<N>