Skip to main content

Serialize

Trait Serialize 

Source
pub trait Serialize {
    const CODE: u8;

    // Required method
    fn serialize(&self) -> Option<Vec<u8>>;

    // Provided method
    fn code(&self) -> u8 { ... }
}

Required Associated Constants§

Source

const CODE: u8

Required Methods§

Source

fn serialize(&self) -> Option<Vec<u8>>

Provided Methods§

Source

fn code(&self) -> u8

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§