Implement command::channel helper

It is analogous to `subscription::channel`.
This commit is contained in:
Héctor Ramón Jiménez 2023-11-29 00:14:27 +01:00
parent 3b7d479534
commit a761448858
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 27 additions and 1 deletions

View file

@ -190,7 +190,6 @@ pub use crate::core::{
color, Alignment, Background, BorderRadius, Color, ContentFit, Degrees,
Gradient, Length, Padding, Pixels, Point, Radians, Rectangle, Size, Vector,
};
pub use crate::runtime::Command;
pub mod clipboard {
//! Access the clipboard.
@ -239,6 +238,11 @@ pub mod mouse {
};
}
pub mod command {
//! Run asynchronous actions.
pub use crate::runtime::command::{channel, Command};
}
pub mod subscription {
//! Listen to external events in your application.
pub use iced_futures::subscription::{
@ -287,6 +291,7 @@ pub mod widget {
}
pub use application::Application;
pub use command::Command;
pub use error::Error;
pub use event::Event;
pub use executor::Executor;