pub struct USDC;Expand description
Marker struct for USDC token deployment implementations.
This struct is used as a type parameter for chain-specific traits (e.g., KnownNetworkEip155,
KnownNetworkSolana) to provide per-network USDC token deployment information.
§Usage
Chain-specific crates implement traits for this marker struct to provide USDC token deployments on different networks. For example:
x402-chain-eip155implementsKnownNetworkEip155<Eip155TokenDeployment>forUSDCx402-chain-solanaimplementsKnownNetworkSolana<SolanaTokenDeployment>forUSDCx402-chain-aptosimplementsKnownNetworkAptos<AptosTokenDeployment>forUSDC
§Example
ⓘ
use x402_chain_eip155::{KnownNetworkEip155, Eip155TokenDeployment};
use x402_types::networks::USDC;
// Get USDC deployment on Base mainnet
let usdc_base: Eip155TokenDeployment = USDC::base();
assert_eq!(usdc_base.chain_reference.value(), 8453);Auto Trait Implementations§
impl Freeze for USDC
impl RefUnwindSafe for USDC
impl Send for USDC
impl Sync for USDC
impl Unpin for USDC
impl UnsafeUnpin for USDC
impl UnwindSafe for USDC
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