pub trait FilterStack<T>: Contains<T> {
    type Stack;

    // Required methods
    fn push(constraint: impl Fn(&T) -> bool + 'static);
    fn pop();
    fn take() -> Self::Stack;
    fn restore(taken: Self::Stack);
}
Expand description

Trait to add a constraint onto the filter.

Required Associated Types§

source

type Stack

The type used to archive the stack.

Required Methods§

source

fn push(constraint: impl Fn(&T) -> bool + 'static)

Add a new constraint onto the filter.

source

fn pop()

Removes the most recently pushed, and not-yet-popped, constraint from the filter.

source

fn take() -> Self::Stack

Clear the filter, returning a value that may be used later to restore it.

source

fn restore(taken: Self::Stack)

Restore the filter from a previous take operation.

Implementors§