Struct exonum::node::Whitelist
[−]
[src]
pub struct Whitelist { /* fields omitted */ }
Whitelist
is special set to keep peers that can connect to us.
Methods
impl Whitelist
[src]
pub fn allow(&self, peer: &PublicKey) -> bool
[src]
Returns true
if a peer with the given public key can connect.
pub fn add(&mut self, peer: PublicKey)
[src]
Adds peer to the whitelist.
pub fn collect_allowed(&self) -> Vec<&PublicKey>
[src]
Returns list of whitelisted peers.
pub fn set_validators<I>(&mut self, list: I) where
I: IntoIterator<Item = PublicKey>,
[src]
I: IntoIterator<Item = PublicKey>,
Resets list of validators with the given public keys.
pub fn is_enabled(&self) -> bool
[src]
Returns true
if whitelist is enabled, otherwise everyone can connect.
Trait Implementations
impl Debug for Whitelist
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Whitelist
[src]
fn clone(&self) -> Whitelist
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more