FromValue

Trait FromValue 

Source
pub trait FromValue: Sized {
    // Required method
    fn from_value(
        node: &Node<'_, '_>,
        attr: &str,
        v: &str,
    ) -> Result<Self, XmlError>;
}
Expand description

Trait for types that can be loaded from an XML node body.

Required Methods§

Source

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Load Self from the body of a node. v is the value being parsed, attr and node are given for context and error handling.

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.

Implementations on Foreign Types§

Source§

impl FromValue for bool

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for f32

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for f64

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for i8

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for i16

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for i32

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for i64

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for u8

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for u16

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for u32

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for u64

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for String

Source§

fn from_value( _node: &Node<'_, '_>, _attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl FromValue for DateTime<Utc>

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Source§

impl<T> FromValue for Vec<T>
where T: FromValue,

Source§

fn from_value( node: &Node<'_, '_>, attr: &str, v: &str, ) -> Result<Self, XmlError>

Implementors§