pub trait ArgValue {
    // Required method
    fn of<'a>(key: &'a str, value: Self) -> Arg<'a>
       where Self: 'a;
}
Expand description

A trait for types that can be the values of an argument set.

This trait is not implementable by users of the library. Users should instead use one of the common types which implements ArgValue, such as i32, f64, or &str.

Required Methods§

source

fn of<'a>(key: &'a str, value: Self) -> Arg<'a>
where Self: 'a,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ArgValue for bool

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for f64

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for i32

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for i64

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for isize

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for u32

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for u64

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for ()

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for usize

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl ArgValue for Koid

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl<'a> ArgValue for &'a str

source§

fn of<'b>(key: &'b str, val: Self) -> Arg<'b>
where Self: 'b,

source§

impl<T> ArgValue for *const T

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

source§

impl<T> ArgValue for *mut T

source§

fn of<'a>(key: &'a str, val: Self) -> Arg<'a>
where Self: 'a,

Implementors§