pub struct DeployedTokenAmount<TAmount, TToken> {
pub amount: TAmount,
pub token: TToken,
}Expand description
A token amount paired with its deployment information.
This type associates a numeric amount with the token deployment it refers to, enabling type-safe handling of token amounts across different chains and tokens.
§Type Parameters
TAmount- The numeric type for the amount (e.g.,U256for EVM,u64for Solana)TToken- The token deployment type containing chain and address information
Fields§
§amount: TAmountThe token amount in the token’s smallest unit (e.g., wei for ETH, lamports for SOL).
token: TTokenThe token deployment information including chain, address, and decimals.
Trait Implementations§
Source§impl<TAmount: Clone, TToken: Clone> Clone for DeployedTokenAmount<TAmount, TToken>
impl<TAmount: Clone, TToken: Clone> Clone for DeployedTokenAmount<TAmount, TToken>
Source§fn clone(&self) -> DeployedTokenAmount<TAmount, TToken>
fn clone(&self) -> DeployedTokenAmount<TAmount, TToken>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<TAmount, TToken> Freeze for DeployedTokenAmount<TAmount, TToken>
impl<TAmount, TToken> RefUnwindSafe for DeployedTokenAmount<TAmount, TToken>where
TAmount: RefUnwindSafe,
TToken: RefUnwindSafe,
impl<TAmount, TToken> Send for DeployedTokenAmount<TAmount, TToken>
impl<TAmount, TToken> Sync for DeployedTokenAmount<TAmount, TToken>
impl<TAmount, TToken> Unpin for DeployedTokenAmount<TAmount, TToken>
impl<TAmount, TToken> UnwindSafe for DeployedTokenAmount<TAmount, TToken>where
TAmount: UnwindSafe,
TToken: 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