Trait former::exposed::HashSetLike
source · pub trait HashSetLike<E>{
// Required method
fn insert(&mut self, element: E) -> Option<E>;
}
Expand description
A trait for containers behaving like a HashSet
, allowing insertion operations.
Implementing this trait enables the associated formed to be used with HashSetSubformer
,
facilitating a builder pattern that is both intuitive and concise.
§Example Implementation
Implementing HashSetLike
for std::collections::HashSet
: