pub struct PartsPerMillion32(/* private fields */);Expand description
Unsigned parts per million stored as u32.
One unit is 0.000001. Range: 0–4,294.967294.
Use for precise bounded ratios and percentages.
u32::MAX is reserved as a NaN sentinel.
Implementations§
Trait Implementations§
Source§impl Add for PartsPerMillion32
impl Add for PartsPerMillion32
Source§impl AddAssign for PartsPerMillion32
impl AddAssign for PartsPerMillion32
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Bytes for PartsPerMillion32
impl Bytes for PartsPerMillion32
Source§const IS_NATIVE_LAYOUT: bool
const IS_NATIVE_LAYOUT: bool
Whether the byte representation from
to_bytes is identical to the
in-memory representation of Self. When true, bulk operations can use
memcpy instead of per-element deserialization. Read moreSource§impl CheckedSub for PartsPerMillion32
impl CheckedSub for PartsPerMillion32
fn checked_sub(self, rhs: Self) -> Option<Self>
Source§impl Clone for PartsPerMillion32
impl Clone for PartsPerMillion32
Source§fn clone(&self) -> PartsPerMillion32
fn clone(&self) -> PartsPerMillion32
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 moreimpl Copy for PartsPerMillion32
Source§impl Debug for PartsPerMillion32
impl Debug for PartsPerMillion32
Source§impl Default for PartsPerMillion32
impl Default for PartsPerMillion32
Source§fn default() -> PartsPerMillion32
fn default() -> PartsPerMillion32
Returns the “default value” for a type. Read more
Source§impl Deref for PartsPerMillion32
impl Deref for PartsPerMillion32
Source§impl<'de> Deserialize<'de> for PartsPerMillion32
impl<'de> Deserialize<'de> for PartsPerMillion32
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PartsPerMillion32
impl Display for PartsPerMillion32
Source§impl Div<usize> for PartsPerMillion32
impl Div<usize> for PartsPerMillion32
impl Eq for PartsPerMillion32
Source§impl Formattable for PartsPerMillion32
impl Formattable for PartsPerMillion32
Source§impl From<PartsPerMillion32> for u32
impl From<PartsPerMillion32> for u32
Source§fn from(value: PartsPerMillion32) -> Self
fn from(value: PartsPerMillion32) -> Self
Converts to this type from the input type.
Source§impl From<PartsPerMillion32> for f64
impl From<PartsPerMillion32> for f64
Source§fn from(value: PartsPerMillion32) -> Self
fn from(value: PartsPerMillion32) -> Self
Converts to this type from the input type.
Source§impl From<PartsPerMillion32> for f32
impl From<PartsPerMillion32> for f32
Source§fn from(value: PartsPerMillion32) -> Self
fn from(value: PartsPerMillion32) -> Self
Converts to this type from the input type.
Source§impl From<PartsPerMillion32> for StoredF32
impl From<PartsPerMillion32> for StoredF32
Source§fn from(value: PartsPerMillion32) -> Self
fn from(value: PartsPerMillion32) -> Self
Converts to this type from the input type.
Source§impl From<StoredF32> for PartsPerMillion32
impl From<StoredF32> for PartsPerMillion32
Source§impl From<f32> for PartsPerMillion32
impl From<f32> for PartsPerMillion32
Source§impl From<f64> for PartsPerMillion32
impl From<f64> for PartsPerMillion32
Source§impl From<u32> for PartsPerMillion32
impl From<u32> for PartsPerMillion32
Source§impl From<usize> for PartsPerMillion32
impl From<usize> for PartsPerMillion32
Source§impl Hash for PartsPerMillion32
impl Hash for PartsPerMillion32
Source§impl JsonSchema for PartsPerMillion32
impl JsonSchema for PartsPerMillion32
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for PartsPerMillion32
impl Ord for PartsPerMillion32
Source§fn cmp(&self, other: &PartsPerMillion32) -> Ordering
fn cmp(&self, other: &PartsPerMillion32) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PartsPerMillion32
impl PartialEq for PartsPerMillion32
Source§impl PartialOrd for PartsPerMillion32
impl PartialOrd for PartsPerMillion32
Source§impl Pco for PartsPerMillion32
impl Pco for PartsPerMillion32
type NumberType = <u32 as Pco>::NumberType
Source§impl Serialize for PartsPerMillion32
impl Serialize for PartsPerMillion32
impl StructuralPartialEq for PartsPerMillion32
Source§impl Sub for PartsPerMillion32
impl Sub for PartsPerMillion32
impl TransparentPco<<u32 as Pco>::NumberType> for PartsPerMillion32
Auto Trait Implementations§
impl Freeze for PartsPerMillion32
impl RefUnwindSafe for PartsPerMillion32
impl Send for PartsPerMillion32
impl Sync for PartsPerMillion32
impl Unpin for PartsPerMillion32
impl UnsafeUnpin for PartsPerMillion32
impl UnwindSafe for PartsPerMillion32
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
impl<T> BytesVecValue for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FromInnerSlice<<T as Pco>::NumberType> for Twhere
T: PcoVecValue,
impl<T> FromInnerSlice<<T as Pco>::NumberType> for Twhere
T: PcoVecValue,
const _SIZE_CHECK: ()
const _ALIGN_CHECK: ()
fn from_inner_slice(vec: Vec<<T as Pco>::NumberType>) -> Vec<T>
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