pub trait ElementAccess<'de>: AttributesAccess<'de> {
type ChildrenAccess: SeqAccess<'de, Error = Self::Error>;
// Required methods
fn name(&self) -> ExpandedName<'_>;
fn children(self) -> Result<Self::ChildrenAccess, Self::Error>;
}Expand description
A trait for accessing properties of an element. This is the first stage of element deserialization, where the element’s name and attributes are accessed. The second stage is accessing the element’s children, which is done by calling ElementAccess::children.
Required Associated Types§
Sourcetype ChildrenAccess: SeqAccess<'de, Error = Self::Error>
type ChildrenAccess: SeqAccess<'de, Error = Self::Error>
The type of the children accessor returned by ElementAccess::children.
Required Methods§
Sourcefn name(&self) -> ExpandedName<'_>
fn name(&self) -> ExpandedName<'_>
Returns the name of the element.
Sourcefn children(self) -> Result<Self::ChildrenAccess, Self::Error>
fn children(self) -> Result<Self::ChildrenAccess, Self::Error>
Returns an accessor for the element’s children.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.