Struct claude::Postfix [] [src]

pub struct Postfix<'a> { /* fields omitted */ }

Implements Display with the currency symbol at the end.

Methods from Deref<Target = Currency>

[src]

Returns an object that implements Display for different methods of printing currency.

[src]

Returns an object that implements Display for different methods of printing currency.

[src]

[src]

Returns the inner value

[src]

Returns the inner symbol

Trait Implementations

impl<'a> Deref for Postfix<'a>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<'a> Display for Postfix<'a>
[src]

Allows Currencies to be displayed as Strings. The format includes no comma delimiting with a two digit precision decimal.

Examples

use claude::Currency;

assert!(Currency{ symbol: None, value: 1210}.postfix().to_string() == "12,10");

println!("{}", Currency{ symbol: Some('€'), value: 100099}.postfix());

The last line prints the following:

"1000,99€"

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Postfix<'a>

impl<'a> Sync for Postfix<'a>