referrerpolicy=no-referrer-when-downgrade

Trait frame_support::traits::SortedMembers

source ·
pub trait SortedMembers<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§

source

fn sorted_members() -> Vec<T>

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

Provided Methods§

source

fn contains(t: &T) -> bool

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

source

fn count() -> usize

Get the number of items in the set.

source

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§

source§

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