Struct dynfmt::curly::SimpleCurlyFormat[][src]

pub struct SimpleCurlyFormat;

Format implementation for simple curly brace based format strings.

This syntax is a subset of what Python 3, Rust, .NET and many logging libraries use. Each argument is formated in display mode.

  1. {}: Refers to the next positional argument.
  2. {0}: Refers to the argument at index 0.
  3. {name}: Refers to the named argument with key "name".


use dynfmt::{Format, SimpleCurlyFormat};

let formatted = SimpleCurlyFormat.format("hello, {}", &["world"]);
assert_eq!("hello, world", formatted.expect("formatting failed"));

Trait Implementations

impl Debug for SimpleCurlyFormat[src]

impl<'f> Format<'f> for SimpleCurlyFormat[src]

type Iter = SimpleCurlyIter<'f>

The iterator returned by iter_args. Read more

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.