pub trait StorageDecodeNonDedupLength: Sealed + DecodeLength {
    // Provided method
    fn decode_non_dedup_len(key: &[u8]) -> Option<usize> { ... }
}
Expand description

It is expected that the length is at the beginning of the encoded object and that the length is a Compact<u32>.

§Note

The length returned by this trait is not deduplicated, i.e. it is the length of the underlying stored Vec.

This trait is sealed.

Provided Methods§

source

fn decode_non_dedup_len(key: &[u8]) -> Option<usize>

Decode the length of the storage value at key.

This function assumes that the length is at the beginning of the encoded object and is a Compact<u32>.

Returns None if the storage value does not exist or the decoding failed.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Encode> StorageDecodeNonDedupLength for BTreeSet<T>

Implementors§