pub trait StorageAppender<V: FullCodec> {
// Required method
fn append<EncodeLikeValue>(&mut self, item: EncodeLikeValue)
where EncodeLikeValue: EncodeLike<V>;
// Provided method
fn append_many<EncodeLikeValue, I>(&mut self, items: I)
where EncodeLikeValue: EncodeLike<V>,
I: IntoIterator<Item = EncodeLikeValue> { ... }
}
Expand description
Append iterator to append values to a storage struct.
Can be used in situations where appending does not have constant time complexity.
Required Methods§
Provided Methods§
Sourcefn append_many<EncodeLikeValue, I>(&mut self, items: I)where
EncodeLikeValue: EncodeLike<V>,
I: IntoIterator<Item = EncodeLikeValue>,
fn append_many<EncodeLikeValue, I>(&mut self, items: I)where
EncodeLikeValue: EncodeLike<V>,
I: IntoIterator<Item = EncodeLikeValue>,
Append many items in linear time O(items.count())
.
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.