[−][src]Struct eosio::Asset
Stores information for owner of asset https://github.com/EOSIO/eosio.cdt/blob/4985359a30da1f883418b7133593f835927b8046/libraries/eosiolib/core/eosio/asset.hpp#L18-L369
Fields
amount: i64
The amount of the asset
symbol: Symbol
The symbol name of the asset
Methods
impl Asset
[src]
pub fn zero<T: Into<Symbol>>(symbol: T) -> Self
[src]
#[must_use]
pub fn is_valid(&self) -> bool
[src]
Check if the asset is valid. A valid asset has its amount <=
max_amount
and its symbol name valid
Trait Implementations
impl Add<Asset> for Asset
[src]
type Output = Self
The resulting type after applying the +
operator.
#[must_use]
fn add(self, rhs: Self) -> Self::Output
[src]
impl Add<Asset> for i64
[src]
type Output = Asset
The resulting type after applying the +
operator.
#[must_use]
fn add(self, rhs: Asset) -> Self::Output
[src]
impl Add<i64> for Asset
[src]
type Output = Self
The resulting type after applying the +
operator.
#[must_use]
fn add(self, rhs: i64) -> Self::Output
[src]
impl AddAssign<Asset> for Asset
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl AddAssign<i64> for Asset
[src]
fn add_assign(&mut self, rhs: i64)
[src]
impl CheckedAdd<Asset> for Asset
[src]
type Output = Result<Self, AssetOpError>
TODO docs
#[must_use]
fn checked_add(self, other: Self) -> Self::Output
[src]
impl CheckedAdd<i128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_add(self, other: i128) -> Self::Output
[src]
impl CheckedAdd<i64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_add(self, other: i64) -> Self::Output
[src]
impl CheckedAdd<isize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_add(self, other: isize) -> Self::Output
[src]
impl CheckedAdd<u128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_add(self, other: u128) -> Self::Output
[src]
impl CheckedAdd<u64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_add(self, other: u64) -> Self::Output
[src]
impl CheckedAdd<usize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_add(self, other: usize) -> Self::Output
[src]
impl CheckedDiv<Asset> for Asset
[src]
type Output = Result<Self, AssetDivOpError>
TODO docs
#[must_use]
fn checked_div(self, other: Self) -> Self::Output
[src]
impl CheckedDiv<i128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_div(self, other: i128) -> Self::Output
[src]
impl CheckedDiv<i64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_div(self, other: i64) -> Self::Output
[src]
impl CheckedDiv<isize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_div(self, other: isize) -> Self::Output
[src]
impl CheckedDiv<u128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_div(self, other: u128) -> Self::Output
[src]
impl CheckedDiv<u64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_div(self, other: u64) -> Self::Output
[src]
impl CheckedDiv<usize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_div(self, other: usize) -> Self::Output
[src]
impl CheckedMul<Asset> for Asset
[src]
type Output = Result<Self, AssetOpError>
TODO docs
#[must_use]
fn checked_mul(self, other: Self) -> Self::Output
[src]
impl CheckedMul<i128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_mul(self, other: i128) -> Self::Output
[src]
impl CheckedMul<i64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_mul(self, other: i64) -> Self::Output
[src]
impl CheckedMul<isize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_mul(self, other: isize) -> Self::Output
[src]
impl CheckedMul<u128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_mul(self, other: u128) -> Self::Output
[src]
impl CheckedMul<u64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_mul(self, other: u64) -> Self::Output
[src]
impl CheckedMul<usize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_mul(self, other: usize) -> Self::Output
[src]
impl CheckedRem<Asset> for Asset
[src]
type Output = Result<Self, AssetOpError>
TODO docs
#[must_use]
fn checked_rem(self, other: Self) -> Self::Output
[src]
impl CheckedRem<i128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_rem(self, other: i128) -> Self::Output
[src]
impl CheckedRem<i64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_rem(self, other: i64) -> Self::Output
[src]
impl CheckedRem<isize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_rem(self, other: isize) -> Self::Output
[src]
impl CheckedRem<u128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_rem(self, other: u128) -> Self::Output
[src]
impl CheckedRem<u64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_rem(self, other: u64) -> Self::Output
[src]
impl CheckedRem<usize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_rem(self, other: usize) -> Self::Output
[src]
impl CheckedSub<Asset> for Asset
[src]
type Output = Result<Self, AssetOpError>
TODO docs
#[must_use]
fn checked_sub(self, other: Self) -> Self::Output
[src]
impl CheckedSub<i128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_sub(self, other: i128) -> Self::Output
[src]
impl CheckedSub<i64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_sub(self, other: i64) -> Self::Output
[src]
impl CheckedSub<isize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_sub(self, other: isize) -> Self::Output
[src]
impl CheckedSub<u128> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_sub(self, other: u128) -> Self::Output
[src]
impl CheckedSub<u64> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_sub(self, other: u64) -> Self::Output
[src]
impl CheckedSub<usize> for Asset
[src]
type Output = Option<Self>
TODO docs
#[must_use]
fn checked_sub(self, other: usize) -> Self::Output
[src]
impl Clone for Asset
[src]
fn clone(&self) -> Asset
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Asset
[src]
impl Debug for Asset
[src]
impl Default for Asset
[src]
impl Display for Asset
[src]
impl Div<Asset> for Asset
[src]
type Output = Self
The resulting type after applying the /
operator.
#[must_use]
fn div(self, rhs: Self) -> Self::Output
[src]
impl Div<Asset> for i64
[src]
type Output = Asset
The resulting type after applying the /
operator.
#[must_use]
fn div(self, rhs: Asset) -> Self::Output
[src]
impl Div<i64> for Asset
[src]
type Output = Self
The resulting type after applying the /
operator.
#[must_use]
fn div(self, rhs: i64) -> Self::Output
[src]
impl DivAssign<Asset> for Asset
[src]
fn div_assign(&mut self, rhs: Self)
[src]
impl DivAssign<i64> for Asset
[src]
fn div_assign(&mut self, rhs: i64)
[src]
impl FromStr for Asset
[src]
type Err = ParseAssetError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Mul<Asset> for Asset
[src]
type Output = Self
The resulting type after applying the *
operator.
#[must_use]
fn mul(self, rhs: Self) -> Self::Output
[src]
impl Mul<Asset> for i64
[src]
type Output = Asset
The resulting type after applying the *
operator.
#[must_use]
fn mul(self, rhs: Asset) -> Self::Output
[src]
impl Mul<i64> for Asset
[src]
type Output = Self
The resulting type after applying the *
operator.
#[must_use]
fn mul(self, rhs: i64) -> Self::Output
[src]
impl MulAssign<Asset> for Asset
[src]
fn mul_assign(&mut self, rhs: Self)
[src]
impl MulAssign<i64> for Asset
[src]
fn mul_assign(&mut self, rhs: i64)
[src]
impl NumBytes for Asset
[src]
impl PartialEq<Asset> for Asset
[src]
impl PartialOrd<Asset> for Asset
[src]
fn partial_cmp(&self, other: &Asset) -> Option<Ordering>
[src]
fn lt(&self, other: &Asset) -> bool
[src]
fn le(&self, other: &Asset) -> bool
[src]
fn gt(&self, other: &Asset) -> bool
[src]
fn ge(&self, other: &Asset) -> bool
[src]
impl Read for Asset
[src]
fn read(bytes: &[u8], pos: &mut usize) -> Result<Self, ReadError>
[src]
fn unpack<T: AsRef<[u8]>>(bytes: T) -> Result<Self, ReadError>
[src]
impl Rem<Asset> for Asset
[src]
type Output = Self
The resulting type after applying the %
operator.
#[must_use]
fn rem(self, rhs: Self) -> Self::Output
[src]
impl Rem<Asset> for i64
[src]
type Output = Asset
The resulting type after applying the %
operator.
#[must_use]
fn rem(self, rhs: Asset) -> Self::Output
[src]
impl Rem<i64> for Asset
[src]
type Output = Self
The resulting type after applying the %
operator.
#[must_use]
fn rem(self, rhs: i64) -> Self::Output
[src]
impl RemAssign<Asset> for Asset
[src]
fn rem_assign(&mut self, rhs: Self)
[src]
impl RemAssign<i64> for Asset
[src]
fn rem_assign(&mut self, rhs: i64)
[src]
impl StructuralPartialEq for Asset
[src]
impl Sub<Asset> for Asset
[src]
type Output = Self
The resulting type after applying the -
operator.
#[must_use]
fn sub(self, rhs: Self) -> Self::Output
[src]
impl Sub<Asset> for i64
[src]
type Output = Asset
The resulting type after applying the -
operator.
#[must_use]
fn sub(self, rhs: Asset) -> Self::Output
[src]
impl Sub<i64> for Asset
[src]
type Output = Self
The resulting type after applying the -
operator.
#[must_use]
fn sub(self, rhs: i64) -> Self::Output
[src]
impl SubAssign<Asset> for Asset
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
impl SubAssign<i64> for Asset
[src]
fn sub_assign(&mut self, rhs: i64)
[src]
impl Write for Asset
[src]
fn write(&self, bytes: &mut [u8], pos: &mut usize) -> Result<(), WriteError>
[src]
fn pack(&self) -> Result<Vec<u8>, WriteError>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,