[][src]Struct dyn_fmt::Arguments

pub struct Arguments<'a, F: AsRef<str>, T: Display + ?Sized + 'a, I: IntoIterator<Item = &'a T> + Clone> { /* fields omitted */ }

This structure represents a format string combined with its arguments. In contrast with fmt::Arguments this structure can be easily and safely created at runtime.

Implementations

impl<'a, F: AsRef<str>, T: Display + ?Sized + 'a, I: IntoIterator<Item = &'a T> + Clone> Arguments<'a, F, T, I>[src]

pub fn new(fmt: F, args: I) -> Self[src]

Creates a new instance of a Displayable structure, representing formatted arguments. A runtime analog of format_args! macro. Extra arguments are ignored, missing arguments are replaced by empty string.

Examples:

dyn_fmt::Arguments::new("{}a{}b{}c", &[1, 2, 3]); // "1a2b3c"
dyn_fmt::Arguments::new("{}a{}b{}c", &[1, 2, 3, 4]); // "1a2b3c"
dyn_fmt::Arguments::new("{}a{}b{}c", &[1, 2]); // "1a2bc"
dyn_fmt::Arguments::new("{{}}{}", &[1, 2]); // "{}1"

Trait Implementations

impl<'a, F: Clone + AsRef<str>, T: Clone + Display + ?Sized + 'a, I: Clone + IntoIterator<Item = &'a T>> Clone for Arguments<'a, F, T, I>[src]

impl<'a, F: Debug + AsRef<str>, T: Debug + Display + ?Sized + 'a, I: Debug + IntoIterator<Item = &'a T> + Clone> Debug for Arguments<'a, F, T, I>[src]

impl<'a, F: AsRef<str>, T: Display + ?Sized + 'a, I: IntoIterator<Item = &'a T> + Clone> Display for Arguments<'a, F, T, I>[src]

Auto Trait Implementations

impl<'a, F, T: ?Sized, I> RefUnwindSafe for Arguments<'a, F, T, I> where
    F: RefUnwindSafe,
    I: RefUnwindSafe

impl<'a, F, T: ?Sized, I> Send for Arguments<'a, F, T, I> where
    F: Send,
    I: Send

impl<'a, F, T: ?Sized, I> Sync for Arguments<'a, F, T, I> where
    F: Sync,
    I: Sync

impl<'a, F, T: ?Sized, I> Unpin for Arguments<'a, F, T, I> where
    F: Unpin,
    I: Unpin

impl<'a, F, T: ?Sized, I> UnwindSafe for Arguments<'a, F, T, I> where
    F: UnwindSafe,
    I: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.