[][src]Struct lib3h::transport::memory_mock::memory_server::MemoryServer

pub struct MemoryServer { /* fields omitted */ }

Methods

impl MemoryServer[src]

pub fn new(uri: &Url) -> Self[src]

Constructor

pub fn has_connection(&self, id: &ConnectionIdRef) -> bool[src]

pub fn connect(
    &mut self,
    requester_uri: &ConnectionIdRef
) -> TransportResult<()>
[src]

Create an inbox for this new sender Will connect the other way.

pub fn close(&mut self, id: &ConnectionIdRef) -> TransportResult<()>[src]

Delete this connectionId's inbox

pub fn post(
    &mut self,
    from_id: &ConnectionIdRef,
    payload: &[u8]
) -> TransportResult<()>
[src]

Add payload to connectionId's inbox

pub fn process(&mut self) -> TransportResult<(DidWork, Vec<TransportEvent>)>[src]

Process all inboxes. Return a TransportEvent::Received for each payload processed.

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