pub struct Coins<C: Context> {
pub amount: Amount,
pub token_address: C::Address,
}
Expand description
Specifies an interface to interact with tokens.
Structure that stores information specifying
a given amount
(type Amount
) of coins stored at a token_address
(type sov_modules_api::Spec::Address
).
Fields§
§amount: Amount
An amount
of coins stored.
token_address: C::Address
The address where the tokens are stored.
Trait Implementations§
source§impl<C: Context> BorshDeserialize for Coins<C>where
Amount: BorshDeserialize,
C::Address: BorshDeserialize,
impl<C: Context> BorshDeserialize for Coins<C>where Amount: BorshDeserialize, C::Address: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,
source§impl<C: Context> BorshSerialize for Coins<C>where
Amount: BorshSerialize,
C::Address: BorshSerialize,
impl<C: Context> BorshSerialize for Coins<C>where Amount: BorshSerialize, C::Address: BorshSerialize,
source§impl<C: PartialEq + Context> PartialEq<Coins<C>> for Coins<C>where
C::Address: PartialEq,
impl<C: PartialEq + Context> PartialEq<Coins<C>> for Coins<C>where C::Address: PartialEq,
impl<C: Context> StructuralPartialEq for Coins<C>
Auto Trait Implementations§
impl<C> RefUnwindSafe for Coins<C>where <C as Spec>::Address: RefUnwindSafe,
impl<C> Send for Coins<C>
impl<C> Sync for Coins<C>
impl<C> Unpin for Coins<C>where <C as Spec>::Address: Unpin,
impl<C> UnwindSafe for Coins<C>where <C as Spec>::Address: UnwindSafe,
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