pub struct PairConfigOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a PairConfig message.
Wraps ::buffa::OwnedView<PairConfigView<'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 PairConfigView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl PairConfigOwnedView
impl PairConfigOwnedView
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: &PairConfig) -> Result<Self, DecodeError>
pub fn from_owned(msg: &PairConfig) -> 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) -> &PairConfigView<'_>
pub fn view(&self) -> &PairConfigView<'_>
Borrow the full PairConfigView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Result<PairConfig, DecodeError>
pub fn to_owned_message(&self) -> Result<PairConfig, 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 symbol_id(&self) -> u32
pub fn symbol_id(&self) -> u32
Stable numeric pair id used by low-latency ConnectRPC requests and streams.
Field 1: symbol_id
Sourcepub fn base_asset(&self) -> &str
pub fn base_asset(&self) -> &str
Base asset code. For BTC-USDT, this is “BTC”.
Field 3: base_asset
Sourcepub fn quote_asset(&self) -> &str
pub fn quote_asset(&self) -> &str
Quote asset code. For BTC-USDT, this is “USDT”.
Field 4: quote_asset
Sourcepub fn tick_size(&self) -> &str
pub fn tick_size(&self) -> &str
Minimum allowed price increment as a decimal string in quote-asset units. Prices use 6 decimal places in scaled integer fields; for example “0.01” means orders must be priced in 0.01 quote-asset increments.
Field 5: tick_size
Sourcepub fn step_size(&self) -> &str
pub fn step_size(&self) -> &str
Minimum allowed quantity increment as a decimal string in base-asset units.
Field 6: step_size
Sourcepub fn min_notional_quote(&self) -> &str
pub fn min_notional_quote(&self) -> &str
Minimum order notional as a decimal string in quote-asset units.
Field 7: min_notional_quote
Sourcepub fn min_qty_base(&self) -> &str
pub fn min_qty_base(&self) -> &str
Minimum order quantity as a decimal string in base-asset units.
Field 8: min_qty_base
Sourcepub fn allow_buy_fee_from_base(&self) -> bool
pub fn allow_buy_fee_from_base(&self) -> bool
Whether BUY order fees may be paid from the base asset instead of the spent quote asset when the order request selects the base fee asset.
Field 9: allow_buy_fee_from_base
Sourcepub fn base_quantity_scale(&self) -> u32
pub fn base_quantity_scale(&self) -> u32
Quantity scale for base-asset amounts in this pair.
Field 10: base_quantity_scale
Sourcepub fn quote_quantity_scale(&self) -> u32
pub fn quote_quantity_scale(&self) -> u32
Quantity scale for quote-asset amounts in this pair.
Field 11: quote_quantity_scale
Sourcepub fn marketdata(&self) -> &MessageFieldView<PairMarketdataConfigView<'_>>
pub fn marketdata(&self) -> &MessageFieldView<PairMarketdataConfigView<'_>>
Market-data display settings for this pair.
Field 12: marketdata
Sourcepub fn listing_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn listing_at(&self) -> &MessageFieldView<TimestampView<'_>>
Scheduled listing timestamp. When unset, the pair has no explicit future listing time.
Field 13: listing_at
Sourcepub fn delisting_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn delisting_at(&self) -> &MessageFieldView<TimestampView<'_>>
Scheduled delisting timestamp. When unset, the pair has no explicit delisting time.
Field 14: delisting_at
Sourcepub fn status(&self) -> EnumValue<PairStatus>
pub fn status(&self) -> EnumValue<PairStatus>
Current trading status.
Field 15: status
Sourcepub fn default_market_slippage_bps_buy(&self) -> i32
pub fn default_market_slippage_bps_buy(&self) -> i32
Default MARKET order slippage cap for BUY orders, in basis points (1 bp = 0.01%). A request-level slippage setting can override this value.
Field 16: default_market_slippage_bps_buy
Sourcepub fn default_market_slippage_bps_sell(&self) -> i32
pub fn default_market_slippage_bps_sell(&self) -> i32
Default MARKET order slippage cap for SELL orders, in basis points (1 bp = 0.01%). A request-level slippage setting can override this value.
Field 17: default_market_slippage_bps_sell
Sourcepub fn max_client_ref_drift_bps(&self) -> i32
pub fn max_client_ref_drift_bps(&self) -> i32
Maximum allowed drift between client reference price and server reference price for MARKET orders, in basis points (1 bp = 0.01%), when client reference pricing is used.
Field 18: max_client_ref_drift_bps
Trait Implementations§
Source§impl AsRef<OwnedView<PairConfigView<'static>>> for PairConfigOwnedView
impl AsRef<OwnedView<PairConfigView<'static>>> for PairConfigOwnedView
Source§fn as_ref(&self) -> &OwnedView<PairConfigView<'static>>
fn as_ref(&self) -> &OwnedView<PairConfigView<'static>>
Source§impl Clone for PairConfigOwnedView
impl Clone for PairConfigOwnedView
Source§fn clone(&self) -> PairConfigOwnedView
fn clone(&self) -> PairConfigOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more