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 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 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