pub struct IanaParser(pub IanaParser);
Expand description
A mapper between IANA time zone identifiers and BCP-47 time zone identifiers.
This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. It also supports normalizing and canonicalizing the IANA strings.
Tuple Fields§
§0: IanaParser
Implementations§
Source§impl IanaParser
impl IanaParser
Sourcepub fn create() -> Box<IanaParser>
pub fn create() -> Box<IanaParser>
Create a new IanaParser
using compiled data
Sourcepub fn create_with_provider(
provider: &DataProvider,
) -> Result<Box<IanaParser>, DataError>
pub fn create_with_provider( provider: &DataProvider, ) -> Result<Box<IanaParser>, DataError>
Create a new IanaParser
using a particular data source
pub fn parse(&self, value: &DiplomatStr) -> Box<TimeZone>
pub fn iter<'a>(&'a self) -> Box<TimeZoneIterator<'a>>
Auto Trait Implementations§
impl Freeze for IanaParser
impl RefUnwindSafe for IanaParser
impl Send for IanaParser
impl Sync for IanaParser
impl Unpin for IanaParser
impl UnwindSafe for IanaParser
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> 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