Trait Buffer

Source
pub trait Buffer<Item: RuntimeType>: RuntimeType + Growable<Item> { }
Expand description

Deterministic, codec-safe growable buffer for transient runtime aggregation.

This trait extends Growable with runtime guarantees so that collections of runtime domain types can be safely constructed, extended, and iterated during deterministic execution.

§Element Requirements:

The contained Item must implement RuntimeType, ensuring each element is:

  • codec-safe via SCALE encoding/decoding,
  • metadata-aware for external tooling,
  • deterministic and comparable within runtime logic.

§Design Notes:

  • Represents transient, in-memory aggregation structures.
  • Does not imply persistence or storage semantics.
  • Does not require strict encoded-size bounds.
  • Focuses on safe, deterministic computation within runtime execution.

§Usage Scenarios:

  • Batching operations
  • Collecting intermediate results
  • Building temporary working sets

§Supported Types:

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, Item> Buffer<Item> for T
where Item: RuntimeType, T: RuntimeType + Growable<Item>,