Struct dbs_utils::epoll_manager::RemoteEndpoint
source · [−]pub struct RemoteEndpoint<S> { /* private fields */ }Expand description
Enables interactions with an EventManager that runs on a different thread of execution.
Implementations
sourceimpl<S> RemoteEndpoint<S>where
S: MutEventSubscriber,
impl<S> RemoteEndpoint<S>where
S: MutEventSubscriber,
sourcepub fn call_blocking<F, O, E>(&self, f: F) -> Result<O, E>where
F: 'static + FnOnce(&mut dyn SubscriberOps<Subscriber = S>) -> Result<O, E> + Send,
O: 'static + Send,
E: 'static + From<Error> + Send,
pub fn call_blocking<F, O, E>(&self, f: F) -> Result<O, E>where
F: 'static + FnOnce(&mut dyn SubscriberOps<Subscriber = S>) -> Result<O, E> + Send,
O: 'static + Send,
E: 'static + From<Error> + Send,
Call the specified closure on the associated remote EventManager (provided as a
SubscriberOps trait object), and return the result. This method blocks until the result
is received, and calling it from the same thread where the event loop runs leads to
a deadlock.
sourcepub fn fire<F>(&self, f: F) -> Result<(), Error>where
F: 'static + FnOnce(&mut dyn SubscriberOps<Subscriber = S>) + Send,
pub fn fire<F>(&self, f: F) -> Result<(), Error>where
F: 'static + FnOnce(&mut dyn SubscriberOps<Subscriber = S>) + Send,
Call the specified closure on the associated local/remote EventManager (provided as a
SubscriberOps trait object), and discard the result. This method only fires
the request but does not wait for result, so it may be called from the same thread where
the event loop runs.
Trait Implementations
sourceimpl<S> Clone for RemoteEndpoint<S>
impl<S> Clone for RemoteEndpoint<S>
sourcefn clone(&self) -> RemoteEndpoint<S>
fn clone(&self) -> RemoteEndpoint<S>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl<S> !RefUnwindSafe for RemoteEndpoint<S>
impl<S> Send for RemoteEndpoint<S>
impl<S> !Sync for RemoteEndpoint<S>
impl<S> Unpin for RemoteEndpoint<S>
impl<S> !UnwindSafe for RemoteEndpoint<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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