pub struct Command<T>(/* private fields */);Expand description
A set of asynchronous actions to be performed by some runtime.
Implementations§
Source§impl<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> Freeze for Command<T>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more