Skip to main content

Serialize

Trait Serialize 

Source
pub trait Serialize {
    // Required method
    fn serialize<S>(&self, serializer: S) -> Result<(), S::Error>
       where S: Serializer;
}
Expand description

Type that could be serialized into a mapping file through Serializer.

Required Methods§

Source

fn serialize<S>(&self, serializer: S) -> Result<(), S::Error>
where S: Serializer,

Serializes this value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Serialize for ()

Source§

fn serialize<S>(&self, serializer: S) -> Result<(), S::Error>
where S: Serializer,

Source§

impl<T> Serialize for &T
where T: Serialize + ?Sized,

Source§

fn serialize<S>(&self, serializer: S) -> Result<(), S::Error>
where S: Serializer,

Source§

impl<T> Serialize for [T]
where T: Serialize,

Source§

fn serialize<S>(&self, serializer: S) -> Result<(), S::Error>
where S: Serializer,

Implementors§