Skip to main content

SemanticsDetails

Struct SemanticsDetails 

Source
pub struct SemanticsDetails {
Show 31 fields pub state_description: Option<String>, pub on_click_label: Option<String>, pub on_long_click: Option<SemanticsLongClick>, pub on_long_click_label: Option<String>, pub on_magic_tap: Option<SemanticsMagicTap>, pub on_magic_tap_label: Option<String>, pub input_labels: Vec<String>, pub language: Option<String>, pub custom_actions: Vec<SemanticsCustomAction>, pub canvas_children: Vec<CanvasSemanticsNode>, pub editable_text: bool, pub multiline: bool, pub is_modal: bool, pub selectable_group: bool, pub pane_title: Option<String>, pub error: Option<String>, pub password: bool, pub text_selection: Option<TextRange>, pub live_region: Option<LiveRegionMode>, pub progress: Option<ProgressBarRangeInfo>, pub set_progress: Option<SemanticsSetProgress>, pub set_text: Option<SemanticsSetText>, pub set_selection: Option<SemanticsSetSelection>, pub expand: Option<SemanticsExpand>, pub collapse: Option<SemanticsExpand>, pub dismiss: Option<SemanticsDismiss>, pub vertical_scroll: Option<ScrollAxisRange>, pub horizontal_scroll: Option<ScrollAxisRange>, pub scroll_by: Option<SemanticsScrollBy>, pub scroll_to_index: Option<SemanticsScrollToIndex>, pub collection: Option<CollectionInfo>,
}
Expand description

What a semantics node reports beyond its place, its name, its value and its click: the properties few nodes set. A node holds them only when it sets one, so a node without any stays small.

Fields§

§state_description: Option<String>

What the control says about itself after its name.

§on_click_label: Option<String>

What activating the control does, as a verb phrase a reader reads out.

§on_long_click: Option<SemanticsLongClick>

What this control does when a screen reader asks for its long press.

§on_long_click_label: Option<String>

What the long press does, as a verb phrase a reader reads out.

§on_magic_tap: Option<SemanticsMagicTap>

What this control does on VoiceOver’s magic tap.

§on_magic_tap_label: Option<String>

What the magic tap does, as a verb phrase a reader reads out.

§input_labels: Vec<String>

The short names a person says to Voice Control to reach this control.

§language: Option<String>

The language of this control’s text, as a BCP 47 tag.

§custom_actions: Vec<SemanticsCustomAction>

The actions a screen reader lists for the control beyond its click.

§canvas_children: Vec<CanvasSemanticsNode>

Controls this node drew rather than laid out; their bounds are relative to this node’s own top-left. See CanvasSemanticsNode.

§editable_text: bool

Whether this node is a field a person types into.

§multiline: bool

Whether an editable field accepts line breaks, independent of its current text.

§is_modal: bool

Whether this subtree makes content outside it unavailable to assistive technology.

§selectable_group: bool

Whether the selectable controls under this node form one group.

§pane_title: Option<String>

The title of the screen or pane this node is the root of.

§error: Option<String>

Why the control’s content is wrong, when it is.

§password: bool

Whether this field holds a secret, so its text stays unspoken.

§text_selection: Option<TextRange>

Where the caret of an editable field sits, or which stretch of its text is picked.

§live_region: Option<LiveRegionMode>

How urgently a screen reader reads this node when its text changes. Compose’s SemanticsProperties.LiveRegion.

§progress: Option<ProgressBarRangeInfo>

The value this control holds inside a range. Compose’s ProgressBarRangeInfo.

§set_progress: Option<SemanticsSetProgress>

What this control does when a screen reader moves its value.

§set_text: Option<SemanticsSetText>

What this field does when a screen reader hands it text.

§set_selection: Option<SemanticsSetSelection>

What this field does when a screen reader moves its caret or picks a stretch of its text.

§expand: Option<SemanticsExpand>

What this control does when a screen reader asks it to open.

§collapse: Option<SemanticsExpand>

What this control does when a screen reader asks it to close.

§dismiss: Option<SemanticsDismiss>

What this control does when a screen reader asks to send it away.

§vertical_scroll: Option<ScrollAxisRange>

How far this container scrolled up and down, when it scrolls.

§horizontal_scroll: Option<ScrollAxisRange>

How far this container scrolled left and right, when it scrolls.

§scroll_by: Option<SemanticsScrollBy>

What this container does when a screen reader pages it.

§scroll_to_index: Option<SemanticsScrollToIndex>

What this list does when a screen reader asks for the row at an index.

§collection: Option<CollectionInfo>

How many rows and columns this list holds, when it is a list.

Implementations§

Source§

impl SemanticsDetails

Source

pub const NONE: Self

Details with nothing set: what a node that holds none reports.

Trait Implementations§

Source§

impl Clone for SemanticsDetails

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SemanticsDetails

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SemanticsDetails

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for SemanticsDetails

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl RareProperties for SemanticsDetails

Source§

const EMPTY: &'static Self

The instance with every property at its default: what a value that holds no box reports.
Source§

impl StructuralPartialEq for SemanticsDetails

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.