Struct dbcrossbarlib::Context
source · [−]pub struct Context { /* private fields */ }
Expand description
Context shared by our various asynchronous operations.
Implementations
sourceimpl Context
impl Context
sourcepub fn create() -> (Self, BoxFuture<()>)
pub fn create() -> (Self, BoxFuture<()>)
Create a new context, and a future represents our background workers,
returning ()
if they all succeed, or an Error
as soon as one of them
fails.
sourcepub fn spawn_worker<W>(&self, worker: W)where
W: Future<Output = Result<()>> + Send + 'static,
pub fn spawn_worker<W>(&self, worker: W)where
W: Future<Output = Result<()>> + Send + 'static,
Spawn an async worker in this context, and report any errors to the
future returned by create
.
sourcepub fn spawn_process(&self, name: String, child: Child)
pub fn spawn_process(&self, name: String, child: Child)
Monitor an asynchrnous child process, and report any errors or non-zero exit codes that occur.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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