pub trait IdentityHandler<I>: Debug {
    type Input: Clone + Debug;

    fn process(&self, id: Self::Input, backend: Backend) -> I;
    fn free(&self, id: I);
}
Expand description

A type that can build true ids from proto-ids, and free true ids.

For some implementations, the true id is based on the proto-id. The caller is responsible for providing well-allocated proto-ids.

For other implementations, the proto-id carries no information (it’s (), say), and this IdentityHandler type takes care of allocating a fresh true id.

See the module-level documentation for details.

Required Associated Types§

The type of proto-id consumed by this filter, to produce a true id.

Required Methods§

Given a proto-id value id, return a true id for backend.

Free the true id id.

Implementations on Foreign Types§

Implementors§