[−][src]Struct iced_futures::Command
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>
[src]
pub fn none() -> Self
[src]
pub fn perform<A>(
future: impl Future<Output = T> + 'static + Send,
f: impl Fn(T) -> A + 'static + Send
) -> Command<A>
[src]
future: impl Future<Output = T> + 'static + Send,
f: impl Fn(T) -> A + 'static + Send
) -> Command<A>
Creates a Command
that performs the action of the given future.
pub fn map<A>(self, f: impl Fn(T) -> A + 'static + Send + Sync) -> Command<A> where
T: 'static,
[src]
T: 'static,
Applies a transformation to the result of a Command
.
pub fn batch(commands: impl IntoIterator<Item = Command<T>>) -> Self
[src]
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.
pub fn futures(self) -> Vec<BoxFuture<T>>
[src]
Converts a Command
into its underlying list of futures.
Trait Implementations
impl<T> Debug for Command<T>
[src]
impl<T, A> From<A> for Command<T> where
A: Future<Output = T> + 'static + Send,
[src]
A: Future<Output = T> + 'static + Send,
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,