Struct message_filter::MessageFilter [] [src]

pub struct MessageFilter<Message> { /* fields omitted */ }

Implementation of message filter.

Methods

impl<Message: Hash> MessageFilter<Message>
[src]

Constructor for capacity based MessageFilter.

Constructor for time based MessageFilter.

Constructor for dual-feature capacity and time based MessageFilter.

Adds a message to the filter.

Removes any expired messages, then adds message, then removes enough older messages until the message count is at or below capacity. If message already exists in the filter and is not already expired, its expiry time is updated and it is moved to the back of the FIFO queue again.

The return value is the number of times this specific message has already been added.

Removes a message from the filter.

Removes any expired messages, then removes the specified message from the filter.

Returns the number of times this message has already been inserted.

Removes any expired messages, then returns whether message exists in the filter or not.

Returns the size of the filter, i.e. the number of added messages.

Clears the filter, removing all entries.

Returns whether there are no entries in the filter.