Struct FromCDataVisitor

Source
pub struct FromCDataVisitor<T> { /* private fields */ }
Expand description

A visitor for deserializing a string from a CDATA section.

Trait Implementations§

Source§

impl<T> Default for FromCDataVisitor<T>

Source§

fn default() -> Self

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

impl<'de, T> Visitor<'de> for FromCDataVisitor<T>
where T: FromStr + Deserialize<'de>,

Source§

type Value = T

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_cdata<E, V: XmlCData<'de>>(self, v: V) -> Result<Self::Value, E>
where E: Error,

Visits an XML CDATA node.
Source§

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

Visits an XML text 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§

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.