[−][src]Struct cxmr_snapshots_index::SnapshotIndex
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]
&'_ self,
market: &'_ Market
) -> Result<Option<Vec<Metadata>>, Error>
Returns all indexed market snapshots.
pub async fn markets_stats<'_>(
&'_ self
) -> Result<Vec<(Market, MarketStats)>, Error>
[src]
&'_ self
) -> Result<Vec<(Market, MarketStats)>, Error>
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]
&'_ self,
market: &'_ Market,
timestamp: u64,
interval: u64
) -> Result<Snapshot, Error>
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]
&'_ self,
market: Market,
timestamp: u64,
interval: u64,
__arg4: SnapshotCache
) -> Result<SharedSnapshot, Error>
Opens snapshot file and reads events.
pub async fn compact<'_>(&'_ self) -> Result<(), Error>
[src]
Compacts database.
Trait Implementations
impl Clone for SnapshotIndex
[src]
fn clone(&self) -> SnapshotIndex
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for SnapshotIndex
impl Send for SnapshotIndex
impl Sync for SnapshotIndex
impl Unpin for SnapshotIndex
impl !UnwindSafe for SnapshotIndex
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,