pub struct ProcessRate { /* private fields */ }Implementations§
Source§impl ProcessRate
impl ProcessRate
Sourcepub fn new(value: f64, unit: impl AsRef<str>) -> Result<Self, ProcessRateError>
pub fn new(value: f64, unit: impl AsRef<str>) -> Result<Self, ProcessRateError>
Creates a process rate from a finite value and non-empty unit.
§Errors
Returns ProcessRateError::NonFiniteValue when the value is not finite.
Returns ProcessRateError::EmptyUnit when the trimmed unit is empty.
pub const fn value(&self) -> f64
pub fn unit(&self) -> &str
Trait Implementations§
Source§impl Clone for ProcessRate
impl Clone for ProcessRate
Source§fn clone(&self) -> ProcessRate
fn clone(&self) -> ProcessRate
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 moreSource§impl Debug for ProcessRate
impl Debug for ProcessRate
Source§impl Display for ProcessRate
impl Display for ProcessRate
Source§impl FromStr for ProcessRate
impl FromStr for ProcessRate
Source§impl PartialEq for ProcessRate
impl PartialEq for ProcessRate
Source§fn eq(&self, other: &ProcessRate) -> bool
fn eq(&self, other: &ProcessRate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProcessRate
Auto Trait Implementations§
impl Freeze for ProcessRate
impl RefUnwindSafe for ProcessRate
impl Send for ProcessRate
impl Sync for ProcessRate
impl Unpin for ProcessRate
impl UnsafeUnpin for ProcessRate
impl UnwindSafe for ProcessRate
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