Struct ElementEnterDeserialize

Source
pub struct ElementEnterDeserialize<T, M, N> {
    pub next: N,
    /* private fields */
}
Expand description

Part of path for TreeDeserializer.

Enters matched element in a tree. It’s attributes are deserialized into given Deserializable type and the deserializer proceeds with contained elements. The type must be Clone because it may be returned multiple times if there are multiple contained elements.

You may want to use the xml_path! macro rather than constructing path manually.

Fields§

§next: N

Next part of the path.

Implementations§

Source§

impl<T, M, N> ElementEnterDeserialize<T, M, N>

Source

pub fn new(tag_matcher: M, next: N) -> Self

Create ElementEnterDeserialize matching tag using given matcher

Source

pub fn set_trace(&mut self, f: impl FnMut(&T) + 'static)

Set the trace callback to be called each time the start tag is successfully parsed.

Source§

impl<T, N> ElementEnterDeserialize<T, ExactTagMatch, N>

Source

pub fn tag(tag: &'static str, next: N) -> Self

Create ElementEnterDeserialize matching given tag

Source§

impl<T, N> ElementEnterDeserialize<T, AnyTagMatch, N>

Source

pub fn any(next: N) -> Self

Create ElementEnterDeserialize matching any tag

Trait Implementations§

Source§

impl<T, M, N> Debug for ElementEnterDeserialize<T, M, N>
where T: Debug, M: Debug, N: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, M: Default, N: Default> Default for ElementEnterDeserialize<T, M, N>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T, M, N> Freeze for ElementEnterDeserialize<T, M, N>
where M: Freeze, N: Freeze, T: Freeze,

§

impl<T, M, N> !RefUnwindSafe for ElementEnterDeserialize<T, M, N>

§

impl<T, M, N> !Send for ElementEnterDeserialize<T, M, N>

§

impl<T, M, N> !Sync for ElementEnterDeserialize<T, M, N>

§

impl<T, M, N> Unpin for ElementEnterDeserialize<T, M, N>
where M: Unpin, N: Unpin, T: Unpin,

§

impl<T, M, N> !UnwindSafe for ElementEnterDeserialize<T, M, N>

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<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.