pub enum Action<T> {
Output(T),
LoadFont {
bytes: Cow<'static, [u8]>,
channel: Sender<Result<(), Error>>,
},
Widget(Box<dyn Operation>),
Clipboard(Action),
Window(Action),
System(Action),
Image(Action),
Event {
window: Id,
event: Event,
},
Tick,
Reload,
PlatformSpecific(Action),
Exit,
}Expand description
An action that the iced runtime can perform.
Variants§
Output(T)
Output some value.
LoadFont
Load a font from its bytes.
Fields
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.
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.
PlatformSpecific(Action)
Run a platform-specific action.
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> !Sync for Action<T>
impl<T> !UnwindSafe for Action<T>
impl<T> Send for Action<T>where
T: Send,
impl<T> Unpin for Action<T>where
T: Unpin,
impl<T> UnsafeUnpin for Action<T>where
T: UnsafeUnpin,
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