pub struct MeasureUnitParser(pub MeasureUnitParser);
Expand description
An ICU4X Measure Unit Parser object, capable of parsing the CLDR unit identifier (e.g. meter-per-square-second
) and get the MeasureUnit
.
Tuple Fields§
§0: MeasureUnitParser
Implementations§
Source§impl MeasureUnitParser
impl MeasureUnitParser
Sourcepub fn create() -> Box<MeasureUnitParser>
pub fn create() -> Box<MeasureUnitParser>
Construct a new MeasureUnitParser
instance using compiled data.
Sourcepub fn create_with_provider(
provider: &DataProvider,
) -> Result<Box<MeasureUnitParser>, DataError>
pub fn create_with_provider( provider: &DataProvider, ) -> Result<Box<MeasureUnitParser>, DataError>
Construct a new MeasureUnitParser
instance using a particular data source.
pub fn parse(&self, unit_id: &DiplomatStr) -> Option<Box<MeasureUnit>>
Auto Trait Implementations§
impl Freeze for MeasureUnitParser
impl RefUnwindSafe for MeasureUnitParser
impl Send for MeasureUnitParser
impl Sync for MeasureUnitParser
impl Unpin for MeasureUnitParser
impl UnwindSafe for MeasureUnitParser
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