Trait ArgValue

Source
pub trait ArgValue {
    // Required methods
    fn of<'a>(key: &'a str, value: Self) -> Arg<'a>
       where Self: 'a;
    fn of_registered<'a>(name_ref: trace_string_ref_t, 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,

Source

fn of_registered<'a>(name_ref: trace_string_ref_t, value: Self) -> Arg<'a>
where Self: 'a,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ArgValue for bool

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: bool) -> Arg<'a>
where bool: 'a,

Source§

impl ArgValue for f64

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: f64) -> Arg<'a>
where f64: 'a,

Source§

impl ArgValue for i32

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: i32) -> Arg<'a>
where i32: 'a,

Source§

impl ArgValue for i64

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: i64) -> Arg<'a>
where i64: 'a,

Source§

impl ArgValue for isize

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: isize) -> Arg<'a>
where isize: 'a,

Source§

impl ArgValue for u32

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: u32) -> Arg<'a>
where u32: 'a,

Source§

impl ArgValue for u64

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: u64) -> Arg<'a>
where u64: 'a,

Source§

impl ArgValue for ()

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: ()) -> Arg<'a>
where (): 'a,

Source§

impl ArgValue for usize

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: usize) -> Arg<'a>
where usize: 'a,

Source§

impl ArgValue for Koid

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: Koid) -> Arg<'a>
where Koid: 'a,

Source§

impl<'a> ArgValue for &'a str

Source§

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

Source§

fn of_registered<'b>(name_ref: trace_string_ref_t, val: &'a str) -> Arg<'b>
where &'a str: 'b,

Source§

impl<T> ArgValue for *const T

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: *const T) -> Arg<'a>
where *const T: 'a,

Source§

impl<T> ArgValue for *mut T

Source§

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

Source§

fn of_registered<'a>(name_ref: trace_string_ref_t, val: *mut T) -> Arg<'a>
where *mut T: 'a,

Implementors§