pub struct CacheSnapshotRef {
pub blob_ref: String,
pub blob: Bytes,
}Expand description
Cache-owned reference to a snapshot blob.
The cache writes and later fetches the blob; external systems persist this opaque reference and may hash the bytes before recording a durable anchor.
Fields§
§blob_ref: StringOpaque cache-owned snapshot location.
blob: BytesSnapshot bytes stored under Self::blob_ref.
Implementations§
Source§impl CacheSnapshotRef
impl CacheSnapshotRef
Sourcepub const POSITION_PREFIX: &str = "cache://position-snapshots/"
pub const POSITION_PREFIX: &str = "cache://position-snapshots/"
Prefix for durable position snapshot locations.
Sourcepub fn new(blob_ref: impl Into<String>, blob: impl Into<Bytes>) -> Self
pub fn new(blob_ref: impl Into<String>, blob: impl Into<Bytes>) -> Self
Creates a new CacheSnapshotRef.
Sourcepub fn position_instrument_id(blob: &[u8]) -> Result<InstrumentId>
pub fn position_instrument_id(blob: &[u8]) -> Result<InstrumentId>
Reads the instrument ID without resolving the snapshot’s currency definitions.
§Errors
Returns an error if the JSON is malformed or the instrument ID is missing or invalid.
Trait Implementations§
Source§impl Clone for CacheSnapshotRef
impl Clone for CacheSnapshotRef
Source§impl Debug for CacheSnapshotRef
impl Debug for CacheSnapshotRef
impl Eq for CacheSnapshotRef
Source§impl PartialEq for CacheSnapshotRef
impl PartialEq for CacheSnapshotRef
impl StructuralPartialEq for CacheSnapshotRef
Auto Trait Implementations§
impl !Freeze for CacheSnapshotRef
impl RefUnwindSafe for CacheSnapshotRef
impl Send for CacheSnapshotRef
impl Sync for CacheSnapshotRef
impl Unpin for CacheSnapshotRef
impl UnsafeUnpin for CacheSnapshotRef
impl UnwindSafe for CacheSnapshotRef
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more