XmlTextVisitor

Struct XmlTextVisitor 

Source
pub struct XmlTextVisitor<'v> { /* private fields */ }
Expand description

A visitor for deserializing to XmlText.

Implementations§

Source§

impl XmlTextVisitor<'_>

Source

pub fn new() -> Self

Creates a new XmlTextVisitor.

Trait Implementations§

Source§

impl Default for XmlTextVisitor<'_>

Source§

fn default() -> Self

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

impl<'v> Visitor<'v> for XmlTextVisitor<'v>

Source§

type Value = XmlText

The type of value that this visitor will produce.
Source§

fn expecting(&self, formatter: &mut Formatter<'_>) -> Result

Returns a description of the type that this visitor expects.
Source§

fn visit_text<E, V>(self, value: V) -> Result<Self::Value, E>
where E: Error, V: XmlText<'v>,

Visits an XML text node.
Source§

fn visit_cdata<E, V>(self, value: V) -> Result<Self::Value, E>
where E: Error, V: XmlCData<'de>,

Visits an XML CDATA node.
Source§

fn visit_element<A>(self, element: A) -> Result<Self::Value, A::Error>
where A: ElementAccess<'de>,

Visits an XML element.
Source§

fn visit_attribute<A>(self, attribute: A) -> Result<Self::Value, A::Error>
where A: AttributeAccess<'de>,

Visits an XML attribute.
Source§

fn visit_seq<S>(self, sequence: S) -> Result<Self::Value, S::Error>
where S: SeqAccess<'de>,

Visits a sequence of values.
Source§

fn visit_pi<E, V>(self, pi: V) -> Result<Self::Value, E>

Visits an XML PI node.
Source§

fn visit_decl<E, V>(self, declaration: V) -> Result<Self::Value, E>
where E: Error, V: XmlDeclaration,

Visits a declaration.
Source§

fn visit_comment<E, V>(self, comment: V) -> Result<Self::Value, E>
where E: Error, V: XmlComment<'de>,

Visits a comment.
Source§

fn visit_doctype<E, V>(self, doctype: V) -> Result<Self::Value, E>
where E: Error, V: XmlDoctype<'de>,

Visits a doctype declaration.
Source§

fn visit_none<E>(self) -> Result<Self::Value, E>
where E: Error,

Visits nothing. This is used when a value is not present.

Auto Trait Implementations§

§

impl<'v> Freeze for XmlTextVisitor<'v>

§

impl<'v> RefUnwindSafe for XmlTextVisitor<'v>

§

impl<'v> Send for XmlTextVisitor<'v>

§

impl<'v> Sync for XmlTextVisitor<'v>

§

impl<'v> Unpin for XmlTextVisitor<'v>

§

impl<'v> UnwindSafe for XmlTextVisitor<'v>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.