[−][src]Struct ucum::system::UnitSystem
Implementations
impl<T> UnitSystem<T>
[src]
pub fn full() -> Self
[src]
pub fn parse<'t>(&self, txt: &'t str) -> UcumResult<'t, Quantity<T>> where
T: Clone + Div<T, Output = T> + From<i32> + From<T> + FromStr + Mul<T, Output = T> + MulAssign,
<T as FromStr>::Err: Error + 'static,
[src]
T: Clone + Div<T, Output = T> + From<i32> + From<T> + FromStr + Mul<T, Output = T> + MulAssign,
<T as FromStr>::Err: Error + 'static,
pub fn parse_bytes<'t>(&self, txt: &'t [u8]) -> UcumResult<'t, Quantity<T>> where
T: Clone + Div<T, Output = T> + From<i32> + From<T> + FromStr + Mul<T, Output = T> + MulAssign,
<T as FromStr>::Err: Error + 'static,
[src]
T: Clone + Div<T, Output = T> + From<i32> + From<T> + FromStr + Mul<T, Output = T> + MulAssign,
<T as FromStr>::Err: Error + 'static,
pub fn parser<'s, 't>(&'s self, txt: &'t [u8]) -> Parser<'s, 't, T>
[src]
pub fn get_unit(&self, unit: &str) -> Option<&UnitDescription<T>>
[src]
pub fn get_prefix(&self, prefix: &str) -> Option<&PrefixDescription<T>>
[src]
pub fn get_descriptions(
&self,
prefixed_unit: &str
) -> Option<(Option<&PrefixDescription<T>>, &UnitDescription<T>)>
[src]
&self,
prefixed_unit: &str
) -> Option<(Option<&PrefixDescription<T>>, &UnitDescription<T>)>
Trait Implementations
impl<T> Default for UnitSystem<T> where
T: Add<T, Output = T> + Div<T, Output = T> + Mul<T, Output = T> + Sub<T, Output = T>,
T: Clone + From<i32> + FromStr + 'static,
<T as FromStr>::Err: Debug,
[src]
T: Add<T, Output = T> + Div<T, Output = T> + Mul<T, Output = T> + Sub<T, Output = T>,
T: Clone + From<i32> + FromStr + 'static,
<T as FromStr>::Err: Debug,
impl<'a, T> Index<&'a str> for UnitSystem<T>
[src]
type Output = UnitDescription<T>
The returned type after indexing.
fn index(&self, idx: &'a str) -> &UnitDescription<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for UnitSystem<T>
impl<T> !Send for UnitSystem<T>
impl<T> !Sync for UnitSystem<T>
impl<T> Unpin for UnitSystem<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for UnitSystem<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,