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.
Required Associated Types§
Required Methods§
fn ensure_list(self) -> Vec<Self::Item>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".