Crate message_filter [] [src]

Message filter limited via size or time

This container allows time or size to be the limiting factor for any key types.

Use

To use as a size based MessageFilter

let mut message_filter = MessageFilter::<usize>::with_capacity(size);

Or as a time based MessageFilter

let time_to_live = time::Duration::milliseconds(100);

let mut message_filter = MessageFilter::<usize>::with_expiry_duration(time_to_live);

Or as time or size limited cache

let size = 10usize; let time_to_live = time::Duration::milliseconds(100); let mut message_filter = MessageFilter::<usize>::with_expiry_duration_and_capacity(time_to_live, size);

Structs

MessageFilter

Allows message filter container which may be limited by size or time. Get(value) is not required as only value is stored