pub struct AgentSwapRequest {
pub chain: AgentChainInput,
pub from_token: String,
pub from_amount: String,
pub to_token: String,
pub signer: String,
pub recipient: Option<String>,
pub slippage_percent: Option<f64>,
pub slippage_bps: Option<u16>,
pub referral_code: Option<u32>,
pub compact: Option<bool>,
pub simple: Option<bool>,
pub disable_rfqs: Option<bool>,
}Expand description
Single-token swap request shape optimized for agent and tool JSON boundaries.
Fields§
§chain: AgentChainInput§from_token: String§from_amount: String§to_token: String§signer: String§recipient: Option<String>§slippage_percent: Option<f64>§slippage_bps: Option<u16>§referral_code: Option<u32>§compact: Option<bool>§simple: Option<bool>§disable_rfqs: Option<bool>Implementations§
Source§impl AgentSwapRequest
impl AgentSwapRequest
Sourcepub fn validate(&self) -> Result<ValidatedAgentSwapRequest>
pub fn validate(&self) -> Result<ValidatedAgentSwapRequest>
Validate and normalize the request into typed Odos/alloy values.
Trait Implementations§
Source§impl Clone for AgentSwapRequest
impl Clone for AgentSwapRequest
Source§fn clone(&self) -> AgentSwapRequest
fn clone(&self) -> AgentSwapRequest
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 moreSource§impl Debug for AgentSwapRequest
impl Debug for AgentSwapRequest
Source§impl<'de> Deserialize<'de> for AgentSwapRequest
impl<'de> Deserialize<'de> for AgentSwapRequest
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 PartialEq for AgentSwapRequest
impl PartialEq for AgentSwapRequest
Source§impl Serialize for AgentSwapRequest
impl Serialize for AgentSwapRequest
impl StructuralPartialEq for AgentSwapRequest
Auto Trait Implementations§
impl Freeze for AgentSwapRequest
impl RefUnwindSafe for AgentSwapRequest
impl Send for AgentSwapRequest
impl Sync for AgentSwapRequest
impl Unpin for AgentSwapRequest
impl UnsafeUnpin for AgentSwapRequest
impl UnwindSafe for AgentSwapRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more