pub struct ElementSnapshot { /* private fields */ }Expand description
Owned facts from the last paint of an observed element.
A component-ID query may read semantics from an explicitly declared native owner, while keeping the component frame’s path, bounds and visibility.
Implementations§
Source§impl ElementSnapshot
impl ElementSnapshot
pub fn role(&self) -> Option<Role>
pub fn path(&self) -> &[ElementId]
pub fn checked(&self) -> Option<bool>
pub fn indeterminate(&self) -> Option<bool>
pub fn selected(&self) -> Option<bool>
pub fn expanded(&self) -> Option<bool>
Sourcepub fn value(&self) -> Option<&str>
pub fn value(&self) -> Option<&str>
The native accessibility value, not rendered text or pixels.
pub fn bounds(&self) -> Bounds<Pixels>
pub fn visible(&self) -> bool
Sourcepub fn focused(&self) -> Option<bool>
pub fn focused(&self) -> Option<bool>
Whether the tracked focus scope contains the current keyboard focus.
For a component with an explicit semantic owner, this is the owner’s
focus scope, not the frame’s independently focusable addon controls.
None means no focus binding or native focus capability was observed.
Panics if the native element advertises Action::Focus but its binding was missed.
Custom elements omitting that action cannot be diagnosed and may return None.
Sourcepub fn disabled(&self) -> Option<bool>
pub fn disabled(&self) -> Option<bool>
None means the native element does not expose a disabled flag.
Absence is not evidence that a control accepts input.
Sourcepub fn label(&self) -> Option<&str>
pub fn label(&self) -> Option<&str>
The accessibility label; it can intentionally differ from visible text.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
The accessibility description, read after the label; it does not replace it.
Sourcepub fn placeholder(&self) -> Option<&str>
pub fn placeholder(&self) -> Option<&str>
The accessibility placeholder: a prompt shown while the element has no value.
Trait Implementations§
Source§impl Clone for ElementSnapshot
impl Clone for ElementSnapshot
Source§fn clone(&self) -> ElementSnapshot
fn clone(&self) -> ElementSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Forget for ElementSnapshot
impl Freeze for ElementSnapshot
impl Move for ElementSnapshot
impl RefUnwindSafe for ElementSnapshot
impl Send for ElementSnapshot
impl Sync for ElementSnapshot
impl Unpin for ElementSnapshot
impl UnsafeUnpin for ElementSnapshot
impl UnwindSafe for ElementSnapshot
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more