pub struct SwapSource {
pub asset_address: String,
pub caip2: String,
}Expand description
The input side of a swap request, including token and chain.
JSON schema
{
"title": "SwapSource",
"description": "The input side of a swap request, including token and
chain.",
"type": "object",
"required": [
"asset_address",
"caip2"
],
"properties": {
"asset_address": {
"description": "Token contract address to sell, or \"native\" for
the chain's native token.",
"type": "string"
},
"caip2": {
"description": "CAIP-2 chain identifier (e.g., \"eip155:1\").",
"type": "string"
}
},
"x-stainless-model": "swaps.swap_source"
}Fields§
§asset_address: StringToken contract address to sell, or “native” for the chain’s native token.
caip2: StringCAIP-2 chain identifier (e.g., “eip155:1”).
Trait Implementations§
Source§impl Clone for SwapSource
impl Clone for SwapSource
Source§fn clone(&self) -> SwapSource
fn clone(&self) -> SwapSource
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 SwapSource
impl Debug for SwapSource
Source§impl<'de> Deserialize<'de> for SwapSource
impl<'de> Deserialize<'de> for SwapSource
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SwapSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SwapSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&SwapSource> for SwapSource
impl From<&SwapSource> for SwapSource
Source§fn from(value: &SwapSource) -> SwapSource
fn from(value: &SwapSource) -> SwapSource
Converts to this type from the input type.
Source§impl Serialize for SwapSource
impl Serialize for SwapSource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SwapSource
impl RefUnwindSafe for SwapSource
impl Send for SwapSource
impl Sync for SwapSource
impl Unpin for SwapSource
impl UnsafeUnpin for SwapSource
impl UnwindSafe for SwapSource
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