Skip to main content

MaxCode

Trait MaxCode 

Source
pub trait MaxCode<T: Default + Debug + FromBytes + IntoBytes> {
    // Required methods
    fn as_code(self) -> T;
    fn from_code(code: T) -> Self;
}
Expand description

The trait for MLD codes that can be further interpreted using different methods e.g. QQIC.

The type implementing this trait should be able to convert itself from/to T

Required Methods§

Source

fn as_code(self) -> T

Convert to T

Source

fn from_code(code: T) -> Self

Convert from T

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<T: Default + Debug + FromBytes + IntoBytes> MaxCode<T> for ()

Source§

fn as_code(self) -> T

Source§

fn from_code(_: T) -> Self

Implementors§