pub struct Command<T>(_);
Expand description
A set of asynchronous actions to be performed by some runtime.
Implementations
sourceimpl<T> Command<T>
impl<T> Command<T>
sourcepub fn perform<A>(
future: impl Future<Output = T> + MaybeSend + 'static,
f: impl Fn(T) -> A + MaybeSend + 'static
) -> Command<A>
pub fn perform<A>(
future: impl Future<Output = T> + MaybeSend + 'static,
f: impl Fn(T) -> A + MaybeSend + 'static
) -> Command<A>
Creates a Command
that performs the action of the given future.
sourcepub fn batch(commands: impl IntoIterator<Item = Command<T>>) -> Command<T>
pub fn batch(commands: impl IntoIterator<Item = Command<T>>) -> Command<T>
Creates a Command
that performs the actions of all the given
commands.
Once this command is run, all the commands will be executed at once.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Command<T>
impl<T> !Send for Command<T>
impl<T> !Sync for Command<T>
impl<T> Unpin for Command<T>
impl<T> !UnwindSafe for Command<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