Skip to main content

Blocker

Trait Blocker 

Source
pub trait Blocker:
    Clone
    + Send
    + 'static {
    type PublicKey: PublicKey;

    // Required method
    fn block(&mut self, peer: Self::PublicKey) -> Feedback;
}
Expand description

Interface for blocking other peers.

Required Associated Types§

Source

type PublicKey: PublicKey

Public key type used to identify peers.

Required Methods§

Source

fn block(&mut self, peer: Self::PublicKey) -> Feedback

Block a peer, disconnecting them if currently connected and preventing future connections.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<C: PublicKey> Blocker for commonware_p2p::authenticated::discovery::Oracle<C>

Source§

impl<C: PublicKey> Blocker for commonware_p2p::authenticated::lookup::Oracle<C>

Source§

impl<P: PublicKey, E: Clock> Blocker for Control<P, E>