[−][src]Struct nimiq_primitives::coin::Coin
Methods
impl Coin
[src]
pub const ZERO: Coin
[src]
pub const LUNAS_PER_COIN: u64
[src]
pub const FRAC_DIGITS: u32
[src]
pub const MAX_SAFE_VALUE: u64
[src]
pub fn from_u64(val: u64) -> Result<Coin, CoinParseError>
[src]
pub fn from_u64_unchecked(val: u64) -> Coin
[src]
impl Coin
[src]
pub fn checked_add(self, rhs: Coin) -> Option<Coin>
[src]
pub fn checked_sub(self, rhs: Coin) -> Option<Coin>
[src]
pub fn checked_factor(self, times: u64) -> Option<Coin>
[src]
Trait Implementations
impl From<Coin> for u64
[src]
impl Clone for Coin
[src]
impl Copy for Coin
[src]
impl Default for Coin
[src]
impl Eq for Coin
[src]
impl Ord for Coin
[src]
fn cmp(&self, other: &Coin) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Coin> for Coin
[src]
impl PartialOrd<Coin> for Coin
[src]
fn partial_cmp(&self, other: &Coin) -> Option<Ordering>
[src]
fn lt(&self, other: &Coin) -> bool
[src]
fn le(&self, other: &Coin) -> bool
[src]
fn gt(&self, other: &Coin) -> bool
[src]
fn ge(&self, other: &Coin) -> bool
[src]
impl Display for Coin
[src]
impl Debug for Coin
[src]
impl Sub<Coin> for Coin
[src]
type Output = Coin
The resulting type after applying the -
operator.
fn sub(self, rhs: Coin) -> Coin
[src]
impl FromStr for Coin
[src]
type Err = CoinParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Add<Coin> for Coin
[src]
type Output = Coin
The resulting type after applying the +
operator.
fn add(self, rhs: Coin) -> Coin
[src]
impl StructuralPartialEq for Coin
[src]
impl StructuralEq for Coin
[src]
impl Deserialize for Coin
[src]
fn deserialize<R: ReadBytesExt>(
reader: &mut R
) -> Result<Self, SerializingError>
[src]
reader: &mut R
) -> Result<Self, SerializingError>
fn deserialize_from_vec(v: &Vec<u8>) -> Result<Self, SerializingError>
[src]
impl Serialize for Coin
[src]
fn serialize<W: WriteBytesExt>(
&self,
writer: &mut W
) -> Result<usize, SerializingError>
[src]
&self,
writer: &mut W
) -> Result<usize, SerializingError>
fn serialized_size(&self) -> usize
[src]
fn serialize_to_vec(&self) -> Vec<u8>
[src]
Auto Trait Implementations
impl Send for Coin
impl Sync for Coin
impl Unpin for Coin
impl UnwindSafe for Coin
impl RefUnwindSafe for Coin
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,