Struct dynfmt::curly::SimpleCurlyFormat [−][src]
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.
{}
: Refers to the next positional argument.{0}
: Refers to the argument at index0
.{name}
: Refers to the named argument with key"name"
.
Example
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]
Auto Trait Implementations
impl RefUnwindSafe for SimpleCurlyFormat
impl Send for SimpleCurlyFormat
impl Sync for SimpleCurlyFormat
impl Unpin for SimpleCurlyFormat
impl UnwindSafe for SimpleCurlyFormat
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,