Skip to main content

WriteMagic

Trait WriteMagic 

Source
pub trait WriteMagic {
    type MagicType;

    const MAGIC: Self::MagicType;
}
Expand description

Types that write a magic number when serialised.

This trait is automatically defined on derived types with a magic directive.

Required Associated Constants§

Source

const MAGIC: Self::MagicType

The magic number.

Required Associated Types§

Source

type MagicType

The type of the magic number.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§