[][src]Struct cxmr_snapshots_index::SnapshotIndex

pub struct SnapshotIndex { /* fields omitted */ }

Snapshots index.

Methods

impl SnapshotIndex[src]

pub fn new_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>[src]

Creates new genome store with default options.

pub fn new<P: AsRef<Path>>(path: P, options: Options) -> Result<Self, Error>[src]

Creates new genome store from RocksDB options.

pub async fn index<'_, '_>(&'_ mut self, path: &'_ str) -> Result<(), Error>[src]

Inserts new snapshots into index.

pub async fn load<'_>(&'_ mut self) -> Result<(), Error>[src]

Loads snapshots index into memory.

pub async fn markets<'_>(&'_ self) -> Result<Vec<Market>, Error>[src]

Returns all indexed markets in index.

pub async fn market<'_, '_>(
    &'_ self,
    market: &'_ Market
) -> Result<Option<Vec<Metadata>>, Error>
[src]

Returns all indexed market snapshots.

pub async fn markets_stats<'_>(
    &'_ self
) -> Result<Vec<(Market, MarketStats)>, Error>
[src]

Returns all indexed markets in index with events amount.

pub async fn open_snapshot<'_, '_>(
    &'_ self,
    market: &'_ Market,
    timestamp: u64,
    interval: u64
) -> Result<Snapshot, Error>
[src]

Opens snapshot file and reads events.

pub async fn open_snapshot_cached<'_>(
    &'_ self,
    market: Market,
    timestamp: u64,
    interval: u64,
    __arg4: SnapshotCache
) -> Result<SharedSnapshot, Error>
[src]

Opens snapshot file and reads events.

pub async fn compact<'_>(&'_ self) -> Result<(), Error>[src]

Compacts database.

Trait Implementations

impl Clone for SnapshotIndex[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.