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:
Vec<T>- Other runtime-safe growable collections whose elements satisfy
RuntimeType
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.