pub enum Role {
Button,
TextInput,
Heading,
Checkbox,
Label,
Link,
MenuItem,
Tab,
Image,
Slider,
Group,
}Expand description
Rol semántico del nodo. Los nombres y la granularidad siguen los roles de AccessKit / ARIA. Subset acotado: agregamos lo que falte cuando aparezca un caller real (regla del repo — no diseñamos para lo hipotético).
Variants§
Button
Botón clickeable. El lector dice “botón
TextInput
Campo de texto editable (single-line o multi-line). Combinable con
value (texto actual) y los flags readonly/required.
Heading
Título de sección (h1..h6 en HTML). El value puede llevar el nivel
como string (“1”, “2”, …) si la app lo necesita; v1 no lo distingue.
Checkbox
Casilla de verificación. Combina con checked.
Label
Texto estático significativo (no interactivo, no título). Si solo es decorativo, no declarar semántica.
Link
Hipervínculo / acción que navega a otra ubicación.
MenuItem
Ítem de un menú (context-menu, menubar, dropdown).
Tab
Pestaña de un tabbar / segmented control.
Image
Imagen significativa. El label actúa como alt-text.
Slider
Control deslizable continuo (volumen, brillo, range). Combinable con
value (string del valor actual) — los rangos numéricos se modelan
más fino en iter posteriores si hace falta.
Group
Agrupador genérico (toolbar, panel, sección). Sirve para que los lectores ofrezcan “saltar al siguiente grupo”.
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.