pub struct SemanticsConfiguration {
pub content_description: Option<String>,
pub state_description: Option<String>,
pub on_click_label: Option<String>,
pub role: Option<SemanticsWidgetRole>,
pub selected: Option<bool>,
pub toggled: Option<bool>,
pub enabled: bool,
pub is_clickable: bool,
pub is_editable_text: bool,
pub text_selection: Option<TextRange>,
pub custom_actions: Vec<SemanticsCustomAction>,
pub canvas_children: Vec<CanvasSemanticsNode>,
}Expand description
Semantics configuration for accessibility.
Fields§
§content_description: Option<String>§state_description: Option<String>Compose’s stateDescription.
on_click_label: Option<String>Compose’s onClick(label = …); implies clickable.
role: Option<SemanticsWidgetRole>Compose’s Role.
selected: Option<bool>§toggled: Option<bool>§enabled: bool§is_clickable: bool§is_editable_text: bool§text_selection: Option<TextRange>§custom_actions: Vec<SemanticsCustomAction>§canvas_children: Vec<CanvasSemanticsNode>Controls this node drew itself instead of laying out. See
CanvasSemanticsNode.
Implementations§
Source§impl SemanticsConfiguration
impl SemanticsConfiguration
pub fn merge(&mut self, other: &SemanticsConfiguration)
Sourcepub fn is_activatable(&self) -> bool
pub fn is_activatable(&self) -> bool
Whether a screen reader should offer activation. A named click label is
how Compose declares onClick, so it implies the action the same way.
Trait Implementations§
Source§impl Clone for SemanticsConfiguration
impl Clone for SemanticsConfiguration
Source§fn clone(&self) -> SemanticsConfiguration
fn clone(&self) -> SemanticsConfiguration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticsConfiguration
impl Debug for SemanticsConfiguration
Source§impl Default for SemanticsConfiguration
impl Default for SemanticsConfiguration
Source§impl PartialEq for SemanticsConfiguration
impl PartialEq for SemanticsConfiguration
impl StructuralPartialEq for SemanticsConfiguration
Auto Trait Implementations§
impl !RefUnwindSafe for SemanticsConfiguration
impl !Send for SemanticsConfiguration
impl !Sync for SemanticsConfiguration
impl !UnwindSafe for SemanticsConfiguration
impl Freeze for SemanticsConfiguration
impl Unpin for SemanticsConfiguration
impl UnsafeUnpin for SemanticsConfiguration
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