pub struct TradingWithdrawIntentPayloadOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a TradingWithdrawIntentPayload message.
Wraps ::buffa::OwnedView<TradingWithdrawIntentPayloadView<'static>>: the decoded view and the ::buffa::bytes::Bytes buffer it borrows from travel together, so the handle is 'static and Send + Sync — suitable for async handlers, spawned tasks, and anywhere a 'static bound is required.
Field accessors return borrows tied to &self. Use Self::view to get the full TradingWithdrawIntentPayloadView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl TradingWithdrawIntentPayloadOwnedView
impl TradingWithdrawIntentPayloadOwnedView
Sourcepub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
pub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
Decode an owned view from a ::buffa::bytes::Bytes buffer.
The view borrows directly from the buffer’s data; the buffer is retained inside the returned handle.
§Errors
Returns ::buffa::DecodeError if the buffer contains invalid
protobuf data.
Sourcepub fn decode_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self, DecodeError>
pub fn decode_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self, DecodeError>
Decode with custom ::buffa::DecodeOptions (recursion limit,
max message size).
§Errors
Returns ::buffa::DecodeError if the buffer is invalid or
exceeds the configured limits.
Sourcepub fn from_owned(
msg: &TradingWithdrawIntentPayload,
) -> Result<Self, DecodeError>
pub fn from_owned( msg: &TradingWithdrawIntentPayload, ) -> Result<Self, DecodeError>
Build from an owned message via an encode → decode round-trip.
§Errors
Returns ::buffa::DecodeError if the re-encoded bytes are
somehow invalid (should not happen for well-formed messages).
Sourcepub fn view(&self) -> &TradingWithdrawIntentPayloadView<'_>
pub fn view(&self) -> &TradingWithdrawIntentPayloadView<'_>
Borrow the full TradingWithdrawIntentPayloadView with its lifetime tied to &self.
Sourcepub fn to_owned_message(
&self,
) -> Result<TradingWithdrawIntentPayload, DecodeError>
pub fn to_owned_message( &self, ) -> Result<TradingWithdrawIntentPayload, DecodeError>
Convert to the owned message type.
§Errors
Returns an error if re-materializing preserved unknown fields fails (e.g. the unknown-field limit is exceeded).
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the handle, returning the underlying bytes buffer.
Sourcepub fn action(&self) -> EnumValue<TradingWithdrawAction>
pub fn action(&self) -> EnumValue<TradingWithdrawAction>
Destination for funds leaving Trading.
Field 1: action
Sourcepub fn asset_id(&self) -> u32
pub fn asset_id(&self) -> u32
Unified asset identifier from Polyester asset metadata. amount_e18 is denominated in this asset at canonical 18-decimal scale.
Field 2: asset_id
Sourcepub fn destination_chain_id(&self) -> u64
pub fn destination_chain_id(&self) -> u64
External network id for TO_EXTERNAL_CHAIN. Omit for TO_FUNDING.
Field 3: destination_chain_id
Sourcepub fn amount_e18(&self) -> &MessageFieldView<U128View<'_>>
pub fn amount_e18(&self) -> &MessageFieldView<U128View<'_>>
Withdraw amount in canonical 18-decimal unified asset units. For example, 0.5 is encoded as 500000000000000000.
Field 4: amount_e18
Sourcepub fn deadline_ts_sec(&self) -> u64
pub fn deadline_ts_sec(&self) -> u64
Unix timestamp in seconds after which this signed user authorization is no longer accepted by the API. This is separate from the server-owned execution deadline used later for on-chain submission.
Field 5: deadline_ts_sec
Sourcepub fn nonce(&self) -> &MessageFieldView<U128View<'_>>
pub fn nonce(&self) -> &MessageFieldView<U128View<'_>>
Client-generated unsigned 128-bit nonce bound to the signed request. This is an identifier, not a decimal amount.
Field 6: nonce
Sourcepub fn destination_address(&self) -> &str
pub fn destination_address(&self) -> &str
Destination address. For TO_EXTERNAL_CHAIN this is an address on destination_chain_id and is validated according to that network. For TO_FUNDING, omit it to move funds to the selected account’s Funding account or provide another Polyester funding address for a Trading-to-Funding transfer.
Field 7: destination_address
Sourcepub fn idempotency_key(&self) -> &str
pub fn idempotency_key(&self) -> &str
Client-chosen idempotency key. Reusing the same key with the same payload returns the existing withdraw; reusing it with different payload fails.
Field 8: idempotency_key
Trait Implementations§
Source§impl AsRef<OwnedView<TradingWithdrawIntentPayloadView<'static>>> for TradingWithdrawIntentPayloadOwnedView
impl AsRef<OwnedView<TradingWithdrawIntentPayloadView<'static>>> for TradingWithdrawIntentPayloadOwnedView
Source§fn as_ref(&self) -> &OwnedView<TradingWithdrawIntentPayloadView<'static>>
fn as_ref(&self) -> &OwnedView<TradingWithdrawIntentPayloadView<'static>>
Source§impl Clone for TradingWithdrawIntentPayloadOwnedView
impl Clone for TradingWithdrawIntentPayloadOwnedView
Source§fn clone(&self) -> TradingWithdrawIntentPayloadOwnedView
fn clone(&self) -> TradingWithdrawIntentPayloadOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more