ink_storage_traits

Trait Packed

Source
pub trait Packed:
    Storable
    + Codec
    + Sealed { }
Expand description

Trait for describing types that can be read and written to storage while all fields occupy only a single storage cell.

If at least one of the fields in the type occupies its own storage cell, this type is considered non-packed.

§Note

The trait is automatically implemented for types that implement scale::Codec via blanket implementation.

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§

Source§

impl<P> Packed for P
where P: Decode + Encode,