pub struct ColdIndexes { /* private fields */ }Expand description
Index partitions in a directory, in ascending order.
Implementations§
Source§impl ColdIndexes
impl ColdIndexes
pub fn open(dir: &Path) -> Result<ColdIndexes, String>
Sourcepub fn open_with(dir: &Path, prev: &ColdIndexes) -> Result<ColdIndexes, String>
pub fn open_with(dir: &Path, prev: &ColdIndexes) -> Result<ColdIndexes, String>
Like open, but partitions already open in prev are taken from there
without reading, so publishing a new partition does not reread the others.
pub fn parts(&self) -> usize
Sourcepub fn first_contiguous_to(&self, end: u32) -> Option<u32>
pub fn first_contiguous_to(&self, end: u32) -> Option<u32>
First ledger of the contiguous indexed history that reaches
end (usually the last ledger before the hot history).
pub fn ledger_by_hash(&self, h: &[u8; 32]) -> Result<Option<u32>, String>
Sourcepub fn tx_candidates(&self, h: &[u8; 32]) -> Result<Vec<(u32, u32)>, String>
pub fn tx_candidates(&self, h: &[u8; 32]) -> Result<Vec<(u32, u32)>, String>
Candidates (ledger, position) for a transaction hash.
Sourcepub fn account_tx(
&self,
account: &AccountId,
lo: TxPosition,
hi: TxPosition,
forward: bool,
limit: usize,
) -> Result<Vec<TxPosition>, String>
pub fn account_tx( &self, account: &AccountId, lo: TxPosition, hi: TxPosition, forward: bool, limit: usize, ) -> Result<Vec<TxPosition>, String>
Account history in [lo, hi] inclusive: at most limit positions,
ascending (forward) or descending, across all partitions.
Trait Implementations§
Source§impl Debug for ColdIndexes
impl Debug for ColdIndexes
Source§impl Default for ColdIndexes
impl Default for ColdIndexes
Source§fn default() -> ColdIndexes
fn default() -> ColdIndexes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ColdIndexes
impl RefUnwindSafe for ColdIndexes
impl Send for ColdIndexes
impl Sync for ColdIndexes
impl Unpin for ColdIndexes
impl UnsafeUnpin for ColdIndexes
impl UnwindSafe for ColdIndexes
Blanket Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].