pub trait IntoInput {
// Required method
fn into_input(self) -> Input;
}Expand description
A trait for converting various types into Input.
The IntoInput trait defines a method into_input for converting an implementing type
into the Input struct. This allows for a flexible way of handling different string
representations and aggregating them into a single Input type.
Required Methods§
sourcefn into_input(self) -> Input
fn into_input(self) -> Input
Converts the implementing type into an Input instance.
§Examples
Basic usage:
use wca::IntoInput;
let string_input: &str = "example string";
let input_struct = string_input.into_input();
let owned_string_input: String = "owned example".to_string();
let owned_input_struct = owned_string_input.into_input();