pub struct IanaParserExtended<I> {
inner: I,
data: DataPayload<TimezoneIdentifiersIanaExtendedV1>,
}Expand description
A parser that supplements IanaParser with about 10kB of additional data to support
returning canonical and case-normalized IANA time zone IDs.
Fields§
§inner: I§data: DataPayload<TimezoneIdentifiersIanaExtendedV1>Implementations§
Source§impl IanaParserExtended<IanaParser>
impl IanaParserExtended<IanaParser>
Sourcepub fn new() -> IanaParserExtendedBorrowed<'static>
pub fn new() -> IanaParserExtendedBorrowed<'static>
Creates a new IanaParserExtended using compiled data.
See IanaParserExtended for an example.
✨ Enabled with the compiled_data Cargo feature.
Sourcepub fn try_new_unstable<P>(provider: &P) -> Result<Self, DataError>
pub fn try_new_unstable<P>(provider: &P) -> Result<Self, DataError>
A version of Self::new that uses custom data provided by a DataProvider.
⚠️ The bounds on provider may change over time, including in SemVer minor releases.
Source§impl<I> IanaParserExtended<I>where
I: AsRef<IanaParser>,
impl<I> IanaParserExtended<I>where
I: AsRef<IanaParser>,
Sourcepub fn try_new_with_parser(parser: I) -> Result<Self, DataError>
pub fn try_new_with_parser(parser: I) -> Result<Self, DataError>
Creates a new IanaParserExtended using compiled data
and a pre-existing IanaParser, which can be borrowed.
See IanaParserExtended for an example.
✨ Enabled with the compiled_data Cargo feature.
Sourcepub fn try_new_with_parser_unstable<P>(
provider: &P,
parser: I,
) -> Result<Self, DataError>
pub fn try_new_with_parser_unstable<P>( provider: &P, parser: I, ) -> Result<Self, DataError>
A version of Self::new that uses custom data provided by a DataProvider.
⚠️ The bounds on provider may change over time, including in SemVer minor releases.
Sourcepub fn as_borrowed(&self) -> IanaParserExtendedBorrowed<'_>
pub fn as_borrowed(&self) -> IanaParserExtendedBorrowed<'_>
Returns a borrowed version of the parser that can be queried.
This avoids a small potential indirection cost when querying the parser.
Trait Implementations§
Source§impl<I: Clone> Clone for IanaParserExtended<I>
impl<I: Clone> Clone for IanaParserExtended<I>
Source§fn clone(&self) -> IanaParserExtended<I>
fn clone(&self) -> IanaParserExtended<I>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<I> Freeze for IanaParserExtended<I>where
I: Freeze,
impl<I> RefUnwindSafe for IanaParserExtended<I>where
I: RefUnwindSafe,
impl<I> !Send for IanaParserExtended<I>
impl<I> !Sync for IanaParserExtended<I>
impl<I> Unpin for IanaParserExtended<I>where
I: Unpin,
impl<I> UnsafeUnpin for IanaParserExtended<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for IanaParserExtended<I>where
I: UnwindSafe,
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