pub struct EarnWithdrawRequestBody {
pub amount: Option<EarnWithdrawRequestBodyAmount>,
pub raw_amount: Option<EarnWithdrawRequestBodyRawAmount>,
pub vault_id: String,
}Expand description
Input for withdrawing assets from an ERC-4626 vault. Exactly one of
amount or raw_amount must be provided.
JSON schema
{
"title": "EarnWithdrawRequestBody",
"description": "Input for withdrawing assets from an ERC-4626 vault.
Exactly one of `amount` or `raw_amount` must be provided.",
"examples": [
{
"amount": "1.5",
"vault_id": "cm7oxq1el000e11o8iwp7d0d0"
}
],
"type": "object",
"required": [
"vault_id"
],
"properties": {
"amount": {
"description": "Human-readable decimal amount to withdraw (e.g.
\"1.5\" for 1.5 USDC). Exactly one of `amount` or `raw_amount` must be
provided.",
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^\\d+(\\.\\d+)?$"
},
"raw_amount": {
"description": "Amount in smallest unit to withdraw (e.g.
\"1500000\" for 1.5 USDC with 6 decimals). Exactly one of `amount` or
`raw_amount` must be provided.",
"type": "string",
"maxLength": 78,
"minLength": 1,
"pattern": "^\\d+$"
},
"vault_id": {
"description": "The ID of the vault to withdraw from.",
"type": "string"
}
},
"x-stainless-model": "wallet_actions.earn_withdraw_request_body"
}Fields§
§amount: Option<EarnWithdrawRequestBodyAmount>Human-readable decimal amount to withdraw (e.g. “1.5” for 1.5 USDC).
Exactly one of amount or raw_amount must be provided.
raw_amount: Option<EarnWithdrawRequestBodyRawAmount>Amount in smallest unit to withdraw (e.g. “1500000” for 1.5 USDC
with 6 decimals). Exactly one of amount or raw_amount must be
provided.
vault_id: StringThe ID of the vault to withdraw from.
Trait Implementations§
Source§impl Clone for EarnWithdrawRequestBody
impl Clone for EarnWithdrawRequestBody
Source§fn clone(&self) -> EarnWithdrawRequestBody
fn clone(&self) -> EarnWithdrawRequestBody
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 EarnWithdrawRequestBody
impl Debug for EarnWithdrawRequestBody
Source§impl<'de> Deserialize<'de> for EarnWithdrawRequestBody
impl<'de> Deserialize<'de> for EarnWithdrawRequestBody
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<&EarnWithdrawRequestBody> for EarnWithdrawRequestBody
impl From<&EarnWithdrawRequestBody> for EarnWithdrawRequestBody
Source§fn from(value: &EarnWithdrawRequestBody) -> Self
fn from(value: &EarnWithdrawRequestBody) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EarnWithdrawRequestBody
impl RefUnwindSafe for EarnWithdrawRequestBody
impl Send for EarnWithdrawRequestBody
impl Sync for EarnWithdrawRequestBody
impl Unpin for EarnWithdrawRequestBody
impl UnsafeUnpin for EarnWithdrawRequestBody
impl UnwindSafe for EarnWithdrawRequestBody
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