pub trait StringIterable {
// Required method
fn to_string_vec(&self) -> Vec<String>;
}Expand description
Trait for converting an iterable of items that can be displayed into a vector of strings
Required Methods§
Sourcefn to_string_vec(&self) -> Vec<String>
fn to_string_vec(&self) -> Vec<String>
Converts the iterable to a vector of strings.
§Example
use handy::iter::StringIterable;
let x = vec![1, 2, 3];
let y = x.to_string_vec();
assert_eq!(y, vec!["1", "2", "3"]);Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".