pub trait EnsureList {
type Item;
// Required method
fn ensure_list(self) -> Vec<Self::Item>;
}Expand description
Ensures that a value is wrapped in a Vec if it isn’t already a collection.
This is a generic trait that can be implemented for different types.