Trait yaserde::YaSerialize

source ·
pub trait YaSerialize: Sized {
    // Required methods
    fn serialize<W: Write>(
        &self,
        writer: &mut Serializer<W>,
    ) -> Result<(), String>;
    fn serialize_attributes(
        &self,
        attributes: Vec<OwnedAttribute>,
        namespace: Namespace,
    ) -> Result<(Vec<OwnedAttribute>, Namespace), String>;
}
Expand description

A data structure that can be serialized into any data format supported by YaSerDe.

Required Methods§

source

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl YaSerialize for bool

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for char

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for f32

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for f64

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for i8

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for i16

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for i32

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for i64

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for isize

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for u8

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for u16

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for u32

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for u64

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl YaSerialize for usize

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, attributes: Vec<OwnedAttribute>, namespace: Namespace, ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

Implementors§