pub struct AccessNode {
pub id: AccessNodeId,
pub role: Option<AccessRole>,
pub commands: Vec<AccessCmdName>,
pub state: Vec<AccessState>,
pub transform: PxTransform,
pub size: PxSize,
pub children: Vec<AccessNodeId>,
pub children_len: u32,
pub descendants_len: u32,
}
Expand description
Represents a widget in the access info tree.
Fields§
§id: AccessNodeId
Widget ID.
role: Option<AccessRole>
Accessibility role.
commands: Vec<AccessCmdName>
Commands the widget supports.
state: Vec<AccessState>
Accessibility state.
transform: PxTransform
Widget transform (in the parent space).
size: PxSize
Widget bounds size (in the transform
space).
children: Vec<AccessNodeId>
Children, including nodes that are not present in the tree because they did not change since last update.
Can be empty if all children are present in the tree. If not empty it must contain all children, omitted and present, in the logical order.
See AccessTreeBuilder::push
for more details.
children_len: u32
Number of children nodes actually present in the tree.
See AccessTreeBuilder::push
for more details.
descendants_len: u32
Number of descendant nodes actually present in the tree.
See AccessTreeBuilder::push
for more details.
Implementations§
source§impl AccessNode
impl AccessNode
sourcepub fn new(id: AccessNodeId, role: Option<AccessRole>) -> Self
pub fn new(id: AccessNodeId, role: Option<AccessRole>) -> Self
New leaf node.
sourcepub fn children_count(&self) -> usize
pub fn children_count(&self) -> usize
Total count of children.
Trait Implementations§
source§impl Clone for AccessNode
impl Clone for AccessNode
source§fn clone(&self) -> AccessNode
fn clone(&self) -> AccessNode
Returns a copy of the value. Read more
1.0.0 · 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 AccessNode
impl Debug for AccessNode
source§impl<'de> Deserialize<'de> for AccessNode
impl<'de> Deserialize<'de> for AccessNode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AccessNode
impl RefUnwindSafe for AccessNode
impl Send for AccessNode
impl Sync for AccessNode
impl Unpin for AccessNode
impl UnwindSafe for AccessNode
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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>
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>
Converts
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>
Converts
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