[][src]Struct lib3h::dht::mirror_dht::MirrorDht

pub struct MirrorDht { /* fields omitted */ }

Mirror DHT implementation: Holds and reflect everything back to other nodes (fullsync)

  • On *HoldRequest, store and gossip data back to every known peer.
  • Gossip can only be a *HoldRequest
  • Monotonic data

Methods

impl MirrorDht[src]

Constructors

pub fn new(peer_address: &str, peer_transport: &Url) -> Self[src]

pub fn new_with_config(config: &DhtConfig) -> Lib3hResult<Self>[src]

Trait Implementations

impl Dht for MirrorDht[src]

Impl Dht interface

fn post(&mut self, cmd: DhtCommand) -> Lib3hResult<()>[src]

Add to inbox

fn process(&mut self) -> Lib3hResult<(DidWork, Vec<DhtEvent>)>[src]

Serve each item in inbox

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self