[][src]Struct lib3h::engine::RealEngine

pub struct RealEngine<T: Transport, D: Dht> { /* fields omitted */ }

Lib3h's 'real mode' as a NetworkEngine

Methods

impl<D: Dht> RealEngine<TransportWss<TcpStream>, D>[src]

pub fn new(
    crypto: Box<dyn CryptoSystem>,
    config: RealEngineConfig,
    name: &str,
    dht_factory: DhtFactory<D>
) -> Lib3hResult<Self>
[src]

Constructor

impl<D: Dht> RealEngine<TransportMemory, D>[src]

Constructor

pub fn new_mock(
    crypto: Box<dyn CryptoSystem>,
    config: RealEngineConfig,
    name: &str,
    dht_factory: DhtFactory<D>
) -> Lib3hResult<Self>
[src]

impl<T: Transport, D: Dht> RealEngine<T, D>[src]

Space layer related private methods Engine does not process a space gateway's Transport because it is shared with the network layer

pub fn get_all_spaces(&self) -> Vec<(SpaceAddress, PeerData)>[src]

Return list of space+this_peer for all currently joined Spaces

pub fn get_first_space_mut(
    &mut self,
    space_address: &str
) -> Option<&mut P2pGateway<P2pGateway<T, D>, D>>
[src]

Return first space gateway for a specified space_address

Trait Implementations

impl<T: Transport, D: Dht> NetworkEngine for RealEngine<T, D>[src]

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

Add incoming Lib3hClientProtocol message in FIFO

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

Process Lib3hClientProtocol message inbox and output a list of Lib3hServerProtocol messages for Core to handle

Auto Trait Implementations

impl<T, D> !Send for RealEngine<T, D>

impl<T, D> Unpin for RealEngine<T, D> where
    D: Unpin

impl<T, D> !Sync for RealEngine<T, D>

impl<T, D> !UnwindSafe for RealEngine<T, D>

impl<T, D> !RefUnwindSafe for RealEngine<T, D>

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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