Struct ElementAccess

Source
pub struct ElementAccess<'a, 'r> { /* private fields */ }

Trait Implementations§

Source§

impl<'de> AttributesAccess<'de> for ElementAccess<'_, 'de>

Source§

type Error = Error

The error type for this attributes access.
Source§

type SubAccess<'a> = SubAttributesAccess<'a, 'de> where Self: 'a

The type of the sub access for this attributes access returned by AttributesAccess::sub_access.
Source§

fn next_attribute<T>(&mut self) -> Result<Option<T>, Self::Error>
where T: Deserialize<'de>,

Get the next attribute.
Source§

fn sub_access(&mut self) -> Result<Self::SubAccess<'_>, Self::Error>

Get a sub access to the attributes.
Source§

impl Drop for ElementAccess<'_, '_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a, 'de> ElementAccess<'de> for ElementAccess<'a, 'de>

Source§

type ChildrenAccess = ChildrenAccess<'a, 'de>

The type of the children accessor returned by ElementAccess::children.
Source§

fn name(&self) -> ExpandedName<'_>

Returns the name of the element.
Source§

fn children(self) -> Result<Self::ChildrenAccess, Self::Error>

Returns an accessor for the element’s children.

Auto Trait Implementations§

§

impl<'a, 'r> Freeze for ElementAccess<'a, 'r>

§

impl<'a, 'r> RefUnwindSafe for ElementAccess<'a, 'r>

§

impl<'a, 'r> Send for ElementAccess<'a, 'r>

§

impl<'a, 'r> Sync for ElementAccess<'a, 'r>

§

impl<'a, 'r> Unpin for ElementAccess<'a, 'r>

§

impl<'a, 'r> !UnwindSafe for ElementAccess<'a, 'r>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'de, T> ElementAccessExt<'de> for T
where T: ElementAccess<'de>,

Source§

fn ensure_name<E>(&self, name: &ExpandedName<'_>) -> Result<(), E>
where E: Error,

Ensures that the element has the given name. If it does not, returns an error.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.