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".

Implementors§

Source§

impl<const N: usize, T: AsRef<[u8; N]>> Serialize<N> for T

Implementation of Serialize trait for types that can be referenced as fixed-size byte array.