pub struct SemanticNode {Show 14 fields
pub dom_id: Option<String>,
pub id: u64,
pub parent: Option<u64>,
pub role: String,
pub name: String,
pub value: Option<String>,
pub enabled: bool,
pub focusable: bool,
pub viewport_fixed: bool,
pub visible: bool,
pub selected: bool,
pub bounds: Option<[f64; 4]>,
pub slot: Option<String>,
pub attributes: BTreeMap<String, String>,
}Fields§
§dom_id: Option<String>The stable DOM identity supplied by the application, when present.
This is deliberately separate from id: id is Blitz’s ephemeral
node handle and may change whenever the element remounts. QA selectors
need the authored HTML id so a test keeps targeting the same control.
id: u64§parent: Option<u64>§role: String§name: String§value: Option<String>§enabled: bool§focusable: boolWhether the element participates in keyboard focus or native activation.
Role alone cannot answer this for elements such as sortable column
headers: a plain <th> and <th tabindex="0"> share a role, while only
the latter is an operable control.
viewport_fixed: boolWhether this box is anchored to the window viewport.
Fixed descendants keep their DOM parent even though layout hoists them to the viewport. An external driver needs this bit so it does not clip a visible fixed control against a scrolled ancestor’s content box.
visible: bool§selected: bool§bounds: Option<[f64; 4]>§slot: Option<String>The library slot this element is, when it is part of a component.
Read from data-slot, which a component library emits to name its own
parts. Addressing a control by the slot it is rather than by the text
it happens to carry is what lets a harness tell a trigger from the thing
it opens: those two routinely share an accessible name, so a check
written against the name passes whether or not anything happened.
attributes: BTreeMap<String, String>ARIA and data attributes that target predicates may compare exactly. Other DOM attributes stay out of semantic snapshots.
Trait Implementations§
Source§impl Clone for SemanticNode
impl Clone for SemanticNode
Source§impl Debug for SemanticNode
impl Debug for SemanticNode
Source§impl<'de> Deserialize<'de> for SemanticNode
impl<'de> Deserialize<'de> for SemanticNode
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>,
Source§impl JsonSchema for SemanticNode
impl JsonSchema for SemanticNode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SemanticNode
impl PartialEq for SemanticNode
Source§impl Serialize for SemanticNode
impl Serialize for SemanticNode
impl StructuralPartialEq for SemanticNode
Auto Trait Implementations§
impl Forget for SemanticNode
impl Freeze for SemanticNode
impl Move for SemanticNode
impl RefUnwindSafe for SemanticNode
impl Send for SemanticNode
impl Sync for SemanticNode
impl Unpin for SemanticNode
impl UnsafeUnpin for SemanticNode
impl UnwindSafe for SemanticNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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