Trait Portable

Source
pub trait Portable:
    Encode
    + Decode
    + Clone { }
Expand description

Codec-safe and cloneable type portable across runtime boundaries.

Portable captures the minimal guarantees required for values that can be encoded, decoded, and transported deterministically within a no_std runtime. These bounds ensure values can be reconstructed from SCALE, inspected during diagnostics, and safely duplicated when passed across runtime logic.

  • [Encode] + [Decode]: Required for deterministic SCALE serialization.
  • Clone: Allows owned duplication across execution boundaries.

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<T> Portable for T
where T: Encode + Decode + Clone,