Snapshot a WS cache’s rolling buffer as a plain array. Handles both the
_data-backed ArrayCache / ArrayCacheByTimestamp (trades, ohlcv, tickers)
and the registry-backed order-book cache handle. Returns None when v
isn’t a cache — to_array then falls back to its generic Dict handling.
Without this, to_array(cache) would surface the cache’s meta fields
(__cacheKind, counters, boolean flags) as if they were entries.
Hot-path get_value variant that takes the key as a &str directly,
skipping a Value::Str heap allocation. Used by the safe_*_k
fast-path readers the transpiler routes literal-key calls through.
Public: snapshot a side marker’s entries as a Value array, or None when
v is not a side marker. Entries live in the shared side store (not the
Dict), so callers that need the raw [[price, size, …], …] list — test
helpers, serializers — go through this.
Read a side marker’s levels as [price, amount] pairs straight from the
shared side store — no intermediate Value list is materialised, so the
typed OrderBook::from_value decode reads the book without cloning every
level. Returns None when v is not a side marker (the caller then reads a
plain Value::Arr). NaN/short rows are dropped (not valid book levels).