Skip to main content

Arg

Struct Arg 

Source
pub struct Arg<T, F = DefaultFormat> { /* private fields */ }

Implementations§

Source§

impl<T> Arg<T>

Source

pub fn scalar(value: T) -> Self

Source

pub fn repeated(value: Vec<T>) -> Self

Source§

impl Arg<bool, DefaultFormat>

Source

pub fn flag(value: bool) -> Self

Source§

impl<T, F> Arg<T, F>

Source

pub fn name(self, name: impl Into<OsString>) -> Self

Source

pub fn value_format<U>(self, formatter: U) -> Arg<T, CustomFormat<U>>

Trait Implementations§

Source§

impl<T, F> IntoArgs for Arg<T, F>
where F: FormatArg<T>,

Source§

fn extend_args(self, args: &mut Vec<OsString>)

Source§

fn into_args(self) -> impl Iterator<Item = OsString>

Auto Trait Implementations§

§

impl<T, F> Freeze for Arg<T, F>
where ArgValue<T>: Freeze, F: Freeze,

§

impl<T, F> RefUnwindSafe for Arg<T, F>
where ArgValue<T>: RefUnwindSafe, F: RefUnwindSafe,

§

impl<T, F> Send for Arg<T, F>
where ArgValue<T>: Send, F: Send,

§

impl<T, F> Sync for Arg<T, F>
where ArgValue<T>: Sync, F: Sync,

§

impl<T, F> Unpin for Arg<T, F>
where ArgValue<T>: Unpin, F: Unpin,

§

impl<T, F> UnsafeUnpin for Arg<T, F>
where ArgValue<T>: UnsafeUnpin, F: UnsafeUnpin,

§

impl<T, F> UnwindSafe for Arg<T, F>
where ArgValue<T>: UnwindSafe, F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.