Struct StateSet
pub struct StateSet {
pub enabled: bool,
pub visible: bool,
pub focused: bool,
pub checked: Option<Toggled>,
pub selected: bool,
pub expanded: Option<bool>,
pub editable: bool,
pub focusable: bool,
pub modal: bool,
pub required: bool,
pub busy: bool,
}Expand description
Boolean state flags for a node.
Semantics for non-applicable states: When a state doesn’t apply to an element’s role, the backend uses the platform’s reported value or defaults:
enabled:true(elements are enabled unless explicitly disabled)visible:true(elements are visible unless explicitly hidden/offscreen)focused,focusable,modal,selected,editable,required,busy:false
States that are inherently inapplicable use Option: checked is None
for non-checkable elements, expanded is None for non-expandable elements.
Fields§
§enabled: bool§visible: bool§focused: bool§checked: Option<Toggled>None = not checkable
selected: bool§expanded: Option<bool>None = not expandable
editable: bool§focusable: boolWhether the element can receive keyboard focus
modal: boolWhether the element is a modal dialog
required: boolForm field required
busy: boolAsync operation in progress
Trait Implementations§
§impl<'de> Deserialize<'de> for StateSet
impl<'de> Deserialize<'de> for StateSet
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateSet, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateSet, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for StateSet
impl Serialize for StateSet
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for StateSet
Auto Trait Implementations§
impl Freeze for StateSet
impl RefUnwindSafe for StateSet
impl Send for StateSet
impl Sync for StateSet
impl Unpin for StateSet
impl UnwindSafe for StateSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.