referrerpolicy=no-referrer-when-downgrade

Trait polkadot_sdk_frame::traits::SortedMembers

pub trait SortedMembers<T>
where T: Ord,
{ // Required method fn sorted_members() -> Vec<T>; // Provided methods fn contains(t: &T) -> bool { ... } fn count() -> usize { ... } fn add(_t: &T) { ... } }
Expand description

A trait for a set which can enumerate its members in order.

Required Methods§

fn sorted_members() -> Vec<T>

Get a vector of all members in the set, ordered.

Provided Methods§

fn contains(t: &T) -> bool

Return true if this “contains” the given value t.

fn count() -> usize

Get the number of items in the set.

fn add(_t: &T)

Add an item that would satisfy contains. It does not make sure any other state is correctly maintained or generated.

Should be used for benchmarking only!!!

Object Safety§

This trait is not object safe.

Implementors§

§

impl<X, T> SortedMembers<X> for IsInVec<T>
where X: Ord + PartialOrd, T: Get<Vec<X>>,