pub struct ModifyOrderRequestOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a ModifyOrderRequest message.
Wraps ::buffa::OwnedView<ModifyOrderRequestView<'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 ModifyOrderRequestView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl ModifyOrderRequestOwnedView
impl ModifyOrderRequestOwnedView
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: &ModifyOrderRequest) -> Result<Self, DecodeError>
pub fn from_owned(msg: &ModifyOrderRequest) -> 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) -> &ModifyOrderRequestView<'_>
pub fn view(&self) -> &ModifyOrderRequestView<'_>
Borrow the full ModifyOrderRequestView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Result<ModifyOrderRequest, DecodeError>
pub fn to_owned_message(&self) -> Result<ModifyOrderRequest, 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 subaccount_id(&self) -> Option<u64>
pub fn subaccount_id(&self) -> Option<u64>
Target sub-account numeric ID. When omitted, uses caller’s root account.
Field 1: subaccount_id
Sourcepub fn request_id(&self) -> &str
pub fn request_id(&self) -> &str
Idempotency key (required).
Field 4: request_id
Sourcepub fn new_price_ticks(&self) -> Option<i64>
pub fn new_price_ticks(&self) -> Option<i64>
Patch fields (presence-based). New limit price in quote units scaled by 1e6. Required for price changes.
Field 5: new_price_ticks
Sourcepub fn new_qty_scaled(&self) -> Option<i64>
pub fn new_qty_scaled(&self) -> Option<i64>
Target total quantity after modify/replace, scaled by the pair’s base_quantity_scale from GetSpotConfig.
Field 6: new_qty_scaled
Sourcepub fn new_attached_risk(&self) -> &MessageFieldView<RiskPolicyView<'_>>
pub fn new_attached_risk(&self) -> &MessageFieldView<RiskPolicyView<'_>>
Replacement attached-risk policy for the order.
Field 7: new_attached_risk
Sourcepub fn behavior(&self) -> EnumValue<ModifyBehavior>
pub fn behavior(&self) -> EnumValue<ModifyBehavior>
Modify behavior policy. MODIFY_BEHAVIOR_UNSPECIFIED is treated as AMEND_OR_REPLACE.
Field 8: behavior
Sourcepub fn new_client_order_id(&self) -> &str
pub fn new_client_order_id(&self) -> &str
Optional new client order id when replace path is taken.
Field 9: new_client_order_id
Trait Implementations§
Source§impl AsRef<OwnedView<ModifyOrderRequestView<'static>>> for ModifyOrderRequestOwnedView
impl AsRef<OwnedView<ModifyOrderRequestView<'static>>> for ModifyOrderRequestOwnedView
Source§fn as_ref(&self) -> &OwnedView<ModifyOrderRequestView<'static>>
fn as_ref(&self) -> &OwnedView<ModifyOrderRequestView<'static>>
Source§impl Clone for ModifyOrderRequestOwnedView
impl Clone for ModifyOrderRequestOwnedView
Source§fn clone(&self) -> ModifyOrderRequestOwnedView
fn clone(&self) -> ModifyOrderRequestOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more