pub struct TokenData {
pub mint_url: MintUrl,
pub proofs: Proofs,
pub memo: Option<String>,
pub value: Amount,
pub unit: CurrencyUnit,
pub redeem_fee: Option<Amount>,
}Expand description
Data extracted from a token
Contains the mint URL, proofs, and metadata from a parsed token.
Fields§
§mint_url: MintUrlThe mint URL from the token
proofs: ProofsThe proofs contained in the token
memo: Option<String>The memo from the token, if present
value: AmountValue of token
unit: CurrencyUnitUnit of token
redeem_fee: Option<Amount>Fee to redeem
If the token is for a mint that we do not know, we cannot get the fee. To avoid just erroring and still allow decoding, this is an option. None does not mean there is no fee, it means we do not know the fee.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TokenData
impl RefUnwindSafe for TokenData
impl Send for TokenData
impl Sync for TokenData
impl Unpin for TokenData
impl UnsafeUnpin for TokenData
impl UnwindSafe for TokenData
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request