pub struct SwapQuoteDestination {
pub asset_address: String,
pub caip2: Option<String>,
pub destination_address: Option<String>,
}Expand description
The output side of a swap quote request.
JSON schema
{
"title": "SwapQuoteDestination",
"description": "The output side of a swap quote 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. Will result in a cross-chain swap
if source and destination chains differ.",
"type": "string"
},
"destination_address": {
"description": "Address to receive the output tokens. Defaults to
the swapping wallet address. Required when swapping between chains with
different address types (e.g. EVM to Solana).",
"type": "string"
}
},
"x-stainless-model": "swaps.swap_quote_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. Will result in a cross-chain swap if source and destination chains differ.
destination_address: Option<String>Address to receive the output tokens. Defaults to the swapping wallet address. Required when swapping between chains with different address types (e.g. EVM to Solana).
Trait Implementations§
Source§impl Clone for SwapQuoteDestination
impl Clone for SwapQuoteDestination
Source§fn clone(&self) -> SwapQuoteDestination
fn clone(&self) -> SwapQuoteDestination
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 SwapQuoteDestination
impl Debug for SwapQuoteDestination
Source§impl<'de> Deserialize<'de> for SwapQuoteDestination
impl<'de> Deserialize<'de> for SwapQuoteDestination
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<&SwapQuoteDestination> for SwapQuoteDestination
impl From<&SwapQuoteDestination> for SwapQuoteDestination
Source§fn from(value: &SwapQuoteDestination) -> Self
fn from(value: &SwapQuoteDestination) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SwapQuoteDestination
impl RefUnwindSafe for SwapQuoteDestination
impl Send for SwapQuoteDestination
impl Sync for SwapQuoteDestination
impl Unpin for SwapQuoteDestination
impl UnsafeUnpin for SwapQuoteDestination
impl UnwindSafe for SwapQuoteDestination
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