pub struct Runtime<S> { /* private fields */ }
Expand description
Implementations
sourceimpl Runtime<SmolScheduler>
impl Runtime<SmolScheduler>
sourcepub fn new() -> Runtime<SmolScheduler>
pub fn new() -> Runtime<SmolScheduler>
Constructs a new Runtime using SmolScheduler::default() for the Scheduler.
sourceimpl<S: Scheduler> Runtime<S>
impl<S: Scheduler> Runtime<S>
sourcepub fn with_scheduler(scheduler: S) -> Runtime<S>
pub fn with_scheduler(scheduler: S) -> Runtime<S>
pub fn spawn<T: Send + 'static>(
&self,
future: impl Future<Output = T> + Send + 'static
) -> Task<T>
pub fn block_on<T: Send + 'static>(
&self,
future: impl Future<Output = T> + Send + 'static
) -> T
pub fn spawn_background<T: Send + 'static>(
&self,
future: impl Future<Output = T> + Send + 'static
)
pub fn spawn_blocking<T: Send + 'static>(
&self,
future: impl Future<Output = T> + Send + 'static
) -> Task<T>
pub fn spawn_blocking_background<T: Send + 'static>(
&self,
future: impl Future<Output = T> + Send + 'static
)
pub async fn start(
&self,
fg: Flowgraph
) -> (Task<Result<Flowgraph>>, FlowgraphHandle)
sourcepub fn run(&self, fg: Flowgraph) -> Result<Flowgraph>
pub fn run(&self, fg: Flowgraph) -> Result<Flowgraph>
Main method that kicks-off the running of a Flowgraph.
pub async fn run_async(&self, fg: Flowgraph) -> Result<Flowgraph>
Trait Implementations
Auto Trait Implementations
impl<S> RefUnwindSafe for Runtime<S>where
S: RefUnwindSafe,
impl<S> Send for Runtime<S>where
S: Send,
impl<S> Sync for Runtime<S>where
S: Sync,
impl<S> Unpin for Runtime<S>where
S: Unpin,
impl<S> UnwindSafe for Runtime<S>where
S: UnwindSafe,
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