pub struct Coin {
pub owner: Address,
pub amount: Word,
pub asset_id: AssetId,
pub maturity: BlockHeight,
pub status: CoinStatus,
pub block_created: BlockHeight,
}
Expand description
Represents the user’s coin for some asset with asset_id
.
The Coin
is either CoinStatus::Spent
or CoinStatus::Unspent
. If the coin is unspent,
it can be used as an input to the transaction and can be spent up to the amount
.
After usage as an input of a transaction, the Coin
becomes CoinStatus::Spent
.
Fields§
§owner: Address
§amount: Word
§asset_id: AssetId
§maturity: BlockHeight
§status: CoinStatus
§block_created: BlockHeight
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Coin
impl RefUnwindSafe for Coin
impl Send for Coin
impl Sync for Coin
impl Unpin for Coin
impl UnwindSafe for Coin
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more