Trait lifeguard::Recycleable
[−]
[src]
pub trait Recycleable {
fn new() -> Self;
fn reset(&mut self);
}In order to be managed by a Pool, values must be of a type that
implements the Recycleable trait. This allows the Pool to create
new instances as well as reset existing instances to a like-new state.
Required Methods
fn new() -> Self
Allocates a new instance of the implementing type.
fn reset(&mut self)
Sets the state of the modified instance to be that of a freshly allocated instance, thereby allowing it to be reused.