Trait wca::IntoInput

source ·
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§

source

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();

Implementations on Foreign Types§

source§

impl IntoInput for &str

source§

impl IntoInput for String

source§

impl IntoInput for Vec<String>

Implementors§