pub enum CoreEffect {
Emit(Emit),
Dispatch(Dispatch),
StateChange(StateChange),
}Expand description
Side effects produced by Core::apply that the host must handle.
Core is zero-I/O: it never writes to stdout, opens windows, or runs platform operations. Instead it returns these effects as commands for the host (the iced daemon or headless runner) to execute. This keeps Core testable and mode-agnostic.
Effects are returned in a Vec and should be processed in order.
Some variants (e.g. StateChange::SyncWindows) may depend on prior
tree mutations from the same apply call.
Variants are grouped by conceptual category so hosts can dispatch on the outer variant first (emit vs dispatch vs state change) and then on the inner typed sub-variant.
Variants§
Emit(Emit)
Write something to the outgoing wire stream.
Dispatch(Dispatch)
Run a platform or widget operation against the renderer.
StateChange(StateChange)
Update host-owned state that lives outside Core.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CoreEffect
impl RefUnwindSafe for CoreEffect
impl Send for CoreEffect
impl Sync for CoreEffect
impl Unpin for CoreEffect
impl UnsafeUnpin for CoreEffect
impl UnwindSafe for CoreEffect
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.