pub struct LocalizedInput<'a> { /* private fields */ }Expand description
A string input with an explicit locale for unambiguous parsing.
This struct is used with the with_locale helper function to specify
the exact format of a numeric string.
§Example
ⓘ
use zakat::{with_locale, InputLocale};
// European format: "1.234,50" means 1234.50
let value = with_locale("1.234,50", InputLocale::EU);
let decimal = value.into_zakat_decimal().unwrap();Trait Implementations§
Source§impl<'a> Clone for LocalizedInput<'a>
impl<'a> Clone for LocalizedInput<'a>
Source§fn clone(&self) -> LocalizedInput<'a>
fn clone(&self) -> LocalizedInput<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for LocalizedInput<'a>
impl<'a> Debug for LocalizedInput<'a>
Source§impl IntoZakatDecimal for LocalizedInput<'_>
impl IntoZakatDecimal for LocalizedInput<'_>
fn into_zakat_decimal(self) -> Result<Decimal, ZakatError>
Auto Trait Implementations§
impl<'a> Freeze for LocalizedInput<'a>
impl<'a> RefUnwindSafe for LocalizedInput<'a>
impl<'a> Send for LocalizedInput<'a>
impl<'a> Sync for LocalizedInput<'a>
impl<'a> Unpin for LocalizedInput<'a>
impl<'a> UnwindSafe for LocalizedInput<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more