pub struct TokenAsset {
pub mint: Pubkey,
pub token_account: Pubkey,
}Expand description
The representation of the side of a trade involving an actual token.
Tokens from the mint mint stored at token_account.
Fields§
§mint: Pubkey§token_account: PubkeyTrait Implementations§
Source§impl Clone for TokenAsset
impl Clone for TokenAsset
Source§impl Debug for TokenAsset
impl Debug for TokenAsset
impl Eq for TokenAsset
Source§impl PartialEq for TokenAsset
impl PartialEq for TokenAsset
impl StructuralPartialEq for TokenAsset
Source§impl TryFrom<TokenAsset> for Asset
impl TryFrom<TokenAsset> for Asset
Source§fn try_from(token: TokenAsset) -> Result<Self, Self::Error>
fn try_from(token: TokenAsset) -> Result<Self, Self::Error>
Rejects a token naming ENCODED_NATIVE_SOL_TRANSFER: that’s native SOL, and
wrapping it as a token side would encode an asset that decodes back as
Asset::Native.
Source§type Error = NativeSolHasNoMint
type Error = NativeSolHasNoMint
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for TokenAsset
impl RefUnwindSafe for TokenAsset
impl Send for TokenAsset
impl Sync for TokenAsset
impl Unpin for TokenAsset
impl UnsafeUnpin for TokenAsset
impl UnwindSafe for TokenAsset
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