pub struct SwapDestination {
pub asset_address: String,
pub caip2: Option<String>,
pub destination_address: Option<String>,
}Expand description
The output side of a swap execution request.
JSON schema
{
"title": "SwapDestination",
"description": "The output side of a swap execution request.",
"type": "object",
"required": [
"asset_address"
],
"properties": {
"asset_address": {
"description": "Token contract address to buy, or \"native\" for
the chain's native token.",
"type": "string"
},
"caip2": {
"description": "CAIP-2 chain identifier for the destination.
Defaults to source chain if omitted. Specify a different chain for
cross-chain swaps.",
"type": "string"
},
"destination_address": {
"description": "Address to receive the output tokens. Defaults to
the swapping wallet address. Required when swapping between different
chain types (e.g. EVM to Solana).",
"type": "string"
}
},
"x-stainless-model": "swaps.swap_destination"
}Fields§
§asset_address: StringToken contract address to buy, or “native” for the chain’s native token.
caip2: Option<String>CAIP-2 chain identifier for the destination. Defaults to source chain if omitted. Specify a different chain for cross-chain swaps.
destination_address: Option<String>Address to receive the output tokens. Defaults to the swapping wallet address. Required when swapping between different chain types (e.g. EVM to Solana).
Trait Implementations§
Source§impl Clone for SwapDestination
impl Clone for SwapDestination
Source§fn clone(&self) -> SwapDestination
fn clone(&self) -> SwapDestination
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SwapDestination
impl Debug for SwapDestination
Source§impl<'de> Deserialize<'de> for SwapDestination
impl<'de> Deserialize<'de> for SwapDestination
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&SwapDestination> for SwapDestination
impl From<&SwapDestination> for SwapDestination
Source§fn from(value: &SwapDestination) -> Self
fn from(value: &SwapDestination) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SwapDestination
impl RefUnwindSafe for SwapDestination
impl Send for SwapDestination
impl Sync for SwapDestination
impl Unpin for SwapDestination
impl UnsafeUnpin for SwapDestination
impl UnwindSafe for SwapDestination
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