pub enum UserEvent<Msg> {
Msg(Msg),
Quit,
OpenWindow {
key: u64,
title: String,
width: u32,
height: u32,
},
CloseWindow {
key: u64,
},
A11y(Event),
}Expand description
Mensaje interno del event loop. Msg lo dispara la app desde un hilo de
fondo vía Handle::dispatch o Handle::spawn; Quit cierra la
ventana y termina el proceso.
Variants§
Msg(Msg)
Quit
OpenWindow
Pide abrir una ventana OS secundaria con la key dada (la app la
usa para distinguir cuál es en App::secondary_view). Idempotente:
si ya existe una con esa key, se enfoca en vez de duplicar. La crea el
event loop (que tiene el ActiveEventLoop); por eso va por mensaje.
CloseWindow
Pide cerrar la ventana secundaria con esa key. No afecta a la primaria.
A11y(Event)
Evento del adapter AccessKit: el lector de pantalla solicitó el árbol
inicial, pidió ejecutar una acción (focus, click, etc.) o se desactivó.
El adapter usa el EventLoopProxy para enviarlos al hilo del runtime.
Trait Implementations§
Auto Trait Implementations§
impl<Msg> Freeze for UserEvent<Msg>where
Msg: Freeze,
impl<Msg> RefUnwindSafe for UserEvent<Msg>where
Msg: RefUnwindSafe,
impl<Msg> Send for UserEvent<Msg>where
Msg: Send,
impl<Msg> Sync for UserEvent<Msg>where
Msg: Sync,
impl<Msg> Unpin for UserEvent<Msg>where
Msg: Unpin,
impl<Msg> UnsafeUnpin for UserEvent<Msg>where
Msg: UnsafeUnpin,
impl<Msg> UnwindSafe for UserEvent<Msg>where
Msg: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.