pub struct MarketOverviewOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a MarketOverview message.
Wraps ::buffa::OwnedView<MarketOverviewView<'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 MarketOverviewView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl MarketOverviewOwnedView
impl MarketOverviewOwnedView
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: &MarketOverview) -> Result<Self, DecodeError>
pub fn from_owned(msg: &MarketOverview) -> 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) -> &MarketOverviewView<'_>
pub fn view(&self) -> &MarketOverviewView<'_>
Borrow the full MarketOverviewView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Result<MarketOverview, DecodeError>
pub fn to_owned_message(&self) -> Result<MarketOverview, 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 last_price_ticks(&self) -> i64
pub fn last_price_ticks(&self) -> i64
Last traded price in quote units scaled by 1e6.
Field 3: last_price_ticks
Sourcepub fn last_trade_ts_ns(&self) -> u64
pub fn last_trade_ts_ns(&self) -> u64
Last trade timestamp in nanoseconds since epoch.
Field 4: last_trade_ts_ns
Sourcepub fn change_24h_bps(&self) -> i32
pub fn change_24h_bps(&self) -> i32
Rolling 24h change expressed in basis points (bp). Example: +123 = +1.23%.
Field 5: change_24h_bps
Sourcepub fn high_24h_ticks(&self) -> i64
pub fn high_24h_ticks(&self) -> i64
Rolling 24h stats. Highest traded price in the 24h window, in quote units scaled by 1e6.
Field 6: high_24h_ticks
Sourcepub fn low_24h_ticks(&self) -> i64
pub fn low_24h_ticks(&self) -> i64
Lowest traded price in the 24h window, in quote units scaled by 1e6.
Field 7: low_24h_ticks
Sourcepub fn volume_24h_base_scaled(&self) -> i64
pub fn volume_24h_base_scaled(&self) -> i64
Rolling 24h base volume scaled by the pair’s base_quantity_scale from GetSpotConfig.
Field 8: volume_24h_base_scaled
Sourcepub fn volume_24h_quote_scaled(&self) -> i64
pub fn volume_24h_quote_scaled(&self) -> i64
Rolling 24h quote volume scaled by the pair’s quote_quantity_scale from GetSpotConfig.
Field 14: volume_24h_quote_scaled
Sourcepub fn listed_ts_ns(&self) -> u64
pub fn listed_ts_ns(&self) -> u64
Listing timestamp in nanoseconds since epoch.
Field 15: listed_ts_ns
Sourcepub fn best_bid_ticks(&self) -> i64
pub fn best_bid_ticks(&self) -> i64
Current best bid price in quote units scaled by 1e6.
Field 9: best_bid_ticks
Sourcepub fn best_bid_qty_scaled(&self) -> i64
pub fn best_bid_qty_scaled(&self) -> i64
Best bid quantity scaled by the pair’s base_quantity_scale from GetSpotConfig.
Field 10: best_bid_qty_scaled
Sourcepub fn best_ask_ticks(&self) -> i64
pub fn best_ask_ticks(&self) -> i64
Current best ask price in quote units scaled by 1e6.
Field 11: best_ask_ticks
Sourcepub fn best_ask_qty_scaled(&self) -> i64
pub fn best_ask_qty_scaled(&self) -> i64
Best ask quantity scaled by the pair’s base_quantity_scale from GetSpotConfig.
Field 12: best_ask_qty_scaled
Sourcepub fn sparklines(&self) -> &RepeatedView<'_, SparklineView<'_>>
pub fn sparklines(&self) -> &RepeatedView<'_, SparklineView<'_>>
Optional sparklines (requested explicitly).
Field 13: sparklines
Trait Implementations§
Source§impl AsRef<OwnedView<MarketOverviewView<'static>>> for MarketOverviewOwnedView
impl AsRef<OwnedView<MarketOverviewView<'static>>> for MarketOverviewOwnedView
Source§fn as_ref(&self) -> &OwnedView<MarketOverviewView<'static>>
fn as_ref(&self) -> &OwnedView<MarketOverviewView<'static>>
Source§impl Clone for MarketOverviewOwnedView
impl Clone for MarketOverviewOwnedView
Source§fn clone(&self) -> MarketOverviewOwnedView
fn clone(&self) -> MarketOverviewOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more