pub struct TokenFractions(/* private fields */);
Implementations§
Source§impl TokenFractions
impl TokenFractions
pub const ZERO: Self
pub fn from_strict_val_unchecked(value: &StrictVal) -> Self
pub fn value(self) -> u64
pub fn saturating_add(&self, other: impl Into<Self>) -> Self
pub fn saturating_sub(&self, other: impl Into<Self>) -> Self
pub fn saturating_add_assign(&mut self, other: impl Into<Self>)
pub fn saturating_sub_assign(&mut self, other: impl Into<Self>)
pub fn checked_add(&self, other: impl Into<Self>) -> Option<Self>
pub fn checked_sub(&self, other: impl Into<Self>) -> Option<Self>
pub fn checked_add_assign(&mut self, other: impl Into<Self>) -> Option<()>
pub fn checked_sub_assign(&mut self, other: impl Into<Self>) -> Option<()>
Trait Implementations§
Source§impl Add for TokenFractions
impl Add for TokenFractions
Source§impl AddAssign for TokenFractions
impl AddAssign for TokenFractions
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl AsMut<<TokenFractions as Wrapper>::Inner> for TokenFractions
impl AsMut<<TokenFractions as Wrapper>::Inner> for TokenFractions
Source§impl AsRef<u64> for TokenFractions
impl AsRef<u64> for TokenFractions
Source§impl Borrow<u64> for TokenFractions
impl Borrow<u64> for TokenFractions
Source§impl BorrowMut<<TokenFractions as Wrapper>::Inner> for TokenFractions
impl BorrowMut<<TokenFractions as Wrapper>::Inner> for TokenFractions
Source§impl Clone for TokenFractions
impl Clone for TokenFractions
Source§fn clone(&self) -> TokenFractions
fn clone(&self) -> TokenFractions
Returns a copy of the value. Read more
1.0.0 · 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 TokenFractions
impl Debug for TokenFractions
Source§impl Default for TokenFractions
impl Default for TokenFractions
Source§fn default() -> TokenFractions
fn default() -> TokenFractions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TokenFractions
impl<'de> Deserialize<'de> for TokenFractions
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 TokenFractions
impl Display for TokenFractions
Source§impl Div for TokenFractions
impl Div for TokenFractions
Source§impl DivAssign for TokenFractions
impl DivAssign for TokenFractions
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moreSource§impl From<TokenFractions> for u64
impl From<TokenFractions> for u64
Source§fn from(wrapped: TokenFractions) -> Self
fn from(wrapped: TokenFractions) -> Self
Converts to this type from the input type.
Source§impl From<u64> for TokenFractions
impl From<u64> for TokenFractions
Source§impl FromStr for TokenFractions
impl FromStr for TokenFractions
Source§impl Hash for TokenFractions
impl Hash for TokenFractions
Source§impl Mul for TokenFractions
impl Mul for TokenFractions
Source§impl MulAssign for TokenFractions
impl MulAssign for TokenFractions
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moreSource§impl Ord for TokenFractions
impl Ord for TokenFractions
Source§fn cmp(&self, other: &TokenFractions) -> Ordering
fn cmp(&self, other: &TokenFractions) -> Ordering
1.21.0 · 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 TokenFractions
impl PartialEq for TokenFractions
Source§impl PartialOrd for TokenFractions
impl PartialOrd for TokenFractions
Source§impl Rem for TokenFractions
impl Rem for TokenFractions
Source§impl RemAssign for TokenFractions
impl RemAssign for TokenFractions
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moreSource§impl Serialize for TokenFractions
impl Serialize for TokenFractions
Source§impl StrictDecode for TokenFractions
impl StrictDecode for TokenFractions
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictEncode for TokenFractions
impl StrictEncode for TokenFractions
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictTuple for TokenFractions
impl StrictTuple for TokenFractions
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for TokenFractions
impl StrictType for TokenFractions
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB21
fn strict_name() -> Option<TypeName>
Source§impl Sub for TokenFractions
impl Sub for TokenFractions
Source§impl SubAssign for TokenFractions
impl SubAssign for TokenFractions
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreSource§impl Wrapper for TokenFractions
impl Wrapper for TokenFractions
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
Source§impl WrapperMut for TokenFractions
impl WrapperMut for TokenFractions
Source§fn as_inner_mut(&mut self) -> &mut <Self as Wrapper>::Inner
fn as_inner_mut(&mut self) -> &mut <Self as Wrapper>::Inner
Returns a mutable reference to the inner representation for the wrapper
type
impl Copy for TokenFractions
impl Eq for TokenFractions
impl StrictProduct for TokenFractions
impl StructuralPartialEq for TokenFractions
Auto Trait Implementations§
impl Freeze for TokenFractions
impl RefUnwindSafe for TokenFractions
impl Send for TokenFractions
impl Sync for TokenFractions
impl Unpin for TokenFractions
impl UnwindSafe for TokenFractions
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> 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
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.