Skip to main content

SemAx

Struct SemAx 

Source
#[non_exhaustive]
pub struct SemAx {
Show 14 fields pub id: u64, pub parent: u64, pub name: Option<String>, pub desc: Option<String>, pub url: Option<String>, pub value_text: Option<String>, pub states: u32, pub set: [u32; 2], pub level: u32, pub cell: [u32; 4], pub grid: [u32; 2], pub live: u32, pub range: Option<[f64; 4]>, pub sel: Option<[u32; 2]>,
}
Expand description

What a semantic record says beyond its kind, label and value (Sem::ax): its setters fill it (ui.sem_rect(..).id64(7).parent(3).desc("..")); a web page’s accessibility tree needs it.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§id: u64

the record’s own id (below 2^62): a screen reader’s requests for it come back with it (ui.a11y_request_take); 0: none

§parent: u64

the record it hangs under in the accessibility tree: one with this id64 (or, without one, this widget id) published in the same frame and window; 0: by its rectangle

§name: Option<String>

its name when the label is something else (a text box’s or drop-down’s label is its text)

§desc: Option<String>

a description beside the name (a hint, a page’s aria-describedby)

§url: Option<String>

a link’s address

§value_text: Option<String>

the text a screen reader says for a value (a slider’s “Monday”, a page’s aria-valuetext)

§states: u32

AS_*

§set: [u32; 2]

its position in its set (1-based) and the set’s size (0: unknown)

§level: u32

the level of a heading, tree item, list item or row (1 the top; 0: none / the value)

§cell: [u32; 4]

a cell’s row, column (0-based), row span, column span (spans 0: no place)

§grid: [u32; 2]

a table’s rows and columns (0: unknown)

§live: u32

LIVE_* (0: as its kind says)

§range: Option<[f64; 4]>

value, minimum, maximum, step with fractions (a meter at 0.4 of 1); None: Sem::value / min / max

§sel: Option<[u32; 2]>

a focused text box’s selection: anchor, caret in characters (a page’s field; the built-in boxes report theirs themselves)

Trait Implementations§

Source§

impl Clone for SemAx

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 SemAx

Source§

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

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

impl Default for SemAx

Source§

fn default() -> Self

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

impl PartialEq for SemAx

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 StructuralPartialEq for SemAx

Auto Trait Implementations§

§

impl Forget for SemAx

§

impl Freeze for SemAx

§

impl Move for SemAx

§

impl RefUnwindSafe for SemAx

§

impl Send for SemAx

§

impl Sync for SemAx

§

impl Unpin for SemAx

§

impl UnsafeUnpin for SemAx

§

impl UnwindSafe for SemAx

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> ErasedDestructor for T
where T: 'static,

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> 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.