Struct elements_frequency::interface::Elements[][src]

pub struct Elements<'list, T> { /* fields omitted */ }

Implementations

Returns a new instance of the struct.

Hash the elements to their frequency.

When we iterate over the hash, the elements might come unordered. So we update their order in this method in a third list namingly frequency table.

Finally we need to chain hash_couple and update_order with result method to get final result.

Examples

use elements_frequency::interface::{Row, Elements};
 
let list = vec![-5, 11, 4, 4, -5, -7, 11];
 
let mut elements = Elements::new(&list);
 
let frequency_table = elements.hash_couple().update_order().result();

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.