pub struct Command<T> { /* private fields */ }Expand description
A collection of async operations.
You should be able to turn a future easily into a Command, either by
using the From trait or Command::perform.
Implementations
impl<T> Command<T>
impl<T> Command<T>
pub fn perform<A>(
future: impl Future<Output = T> + Send + 'static,
f: impl Fn(T) -> A + Send + 'static
) -> Command<A>
pub fn perform<A>(
future: impl Future<Output = T> + Send + 'static,
f: impl Fn(T) -> A + Send + 'static
) -> Command<A>
Creates a Command that performs the action of the given future.
pub fn map<A>(self, f: impl Fn(T) -> A + Send + Sync + 'static) -> Command<A> where
T: 'static,
pub fn map<A>(self, f: impl Fn(T) -> A + Send + Sync + 'static) -> Command<A> where
T: 'static,
Applies a transformation to the result of a Command.
pub 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
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value as a parameter of self.