Trait Container
Source pub trait Container<V> {
type Value;
// Required methods
fn is_empty(&self) -> bool;
fn has(&self, value: &V) -> bool;
fn replace(&mut self, value: V) -> Option<V>;
// Provided method
fn set(&mut self, value: V) { ... }
}
Expand description
Container containing field values.
Indicates whether this Container
is empty (contains no values).
Indicates whether the provided value
is present in this Container
.
Replaces the value
contained in this Container
with the provided
one, and returns the replaced one, if any.
Sets the provided value
into this Container
, dropping the
previous one, if any.