Struct casper_types::Motes
source · pub struct Motes(/* private fields */);
Expand description
A struct representing a number of Motes
.
Implementations§
source§impl Motes
impl Motes
sourcepub fn checked_add(&self, rhs: Self) -> Option<Self>
pub fn checked_add(&self, rhs: Self) -> Option<Self>
Checked integer addition. Computes self + rhs
, returning None
if overflow occurred.
sourcepub fn checked_sub(&self, rhs: Self) -> Option<Self>
pub fn checked_sub(&self, rhs: Self) -> Option<Self>
Checked integer subtraction. Computes self - rhs
, returning None
if underflow occurred.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Motes
impl<'de> Deserialize<'de> for Motes
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 Ord for Motes
impl Ord for Motes
source§impl PartialEq for Motes
impl PartialEq for Motes
source§impl PartialOrd for Motes
impl PartialOrd for Motes
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ToBytes for Motes
impl ToBytes for Motes
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8>
which would be returned from a successful call to
to_bytes()
or into_bytes()
. The data is not actually serialized, so this call is
relatively cheap.impl Copy for Motes
impl Eq for Motes
impl StructuralEq for Motes
impl StructuralPartialEq for Motes
Auto Trait Implementations§
impl RefUnwindSafe for Motes
impl Send for Motes
impl Sync for Motes
impl Unpin for Motes
impl UnwindSafe for Motes
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