Struct distant_net::PostOffice
source · [−]pub struct PostOffice<T> { /* private fields */ }
Implementations
sourceimpl<T> PostOffice<T> where
T: Send + 'static,
impl<T> PostOffice<T> where
T: Send + 'static,
sourcepub fn new(cleanup: Duration) -> Self
pub fn new(cleanup: Duration) -> Self
Creates a new post office that delivers to mailboxes, cleaning up orphaned mailboxes
waiting cleanup
time inbetween attempts
sourcepub async fn make_mailbox(&self, id: Id, buffer: usize) -> Mailbox<T>
pub async fn make_mailbox(&self, id: Id, buffer: usize) -> Mailbox<T>
Creates a new mailbox using the given id and buffer size for maximum values that can be queued in the mailbox
sourceimpl<T> PostOffice<Response<T>> where
T: Send + 'static,
impl<T> PostOffice<Response<T>> where
T: Send + 'static,
sourcepub async fn deliver_response(&self, res: Response<T>) -> bool
pub async fn deliver_response(&self, res: Response<T>) -> bool
Delivers some response to appropriate mailbox, returning false if no mailbox is found for the response’s origin or if the mailbox is no longer receiving values
Trait Implementations
sourceimpl<T: Clone> Clone for PostOffice<T>
impl<T: Clone> Clone for PostOffice<T>
sourcefn clone(&self) -> PostOffice<T>
fn clone(&self) -> PostOffice<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for PostOffice<T>
impl<T> Send for PostOffice<T> where
T: Send,
impl<T> Sync for PostOffice<T> where
T: Send,
impl<T> Unpin for PostOffice<T>
impl<T> !UnwindSafe for PostOffice<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more