Skip to main content

Serialize

Trait Serialize 

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

Trait for serialization of types which can be referenced as fixed-size byte arrays.

Required Methods§

Source

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

Serialize self using the provided Serializer.

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<const N: usize> Serialize<N> for [u8; N]

Source§

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

Implementors§