pub enum Action<T> {
Output(T),
Widget(Box<dyn Operation>),
Clipboard(Action),
Window(Action),
System(Action),
Font(Action),
Image(Action),
Event {
window: Id,
event: Event,
},
Tick,
Reload,
Announce(String),
Exit,
}Expand description
An action that the iced runtime can perform.
Variants§
Output(T)
Output some value.
Widget(Box<dyn Operation>)
Run a widget operation.
Clipboard(Action)
Run a clipboard action.
Window(Action)
Run a window action.
System(Action)
Run a system action.
Font(Action)
Run a font action.
Image(Action)
Run an image action.
Event
Produce an event.
Tick
Poll any resources that may have pending computations.
Reload
Recreate all user interfaces and redraw all windows.
Announce(String)
Announce a message to assistive technology via a live region.
The text will be spoken by screen readers using an assertive live-region announcement on the next accessibility tree update.
Exit
Exits the runtime.
This will normally close any application windows and terminate the runtime loop.
Implementations§
Source§impl<T> Action<T>
impl<T> Action<T>
Sourcepub fn widget(operation: impl Operation + 'static) -> Self
pub fn widget(operation: impl Operation + 'static) -> Self
Creates a new Action::Widget with the given widget::Operation.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Action<T>
impl<T> !RefUnwindSafe for Action<T>
impl<T> Send for Action<T>where
T: Send,
impl<T> !Sync for Action<T>
impl<T> Unpin for Action<T>where
T: Unpin,
impl<T> UnsafeUnpin for Action<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for Action<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