Struct solana_storage_bigtable::LedgerStorage
source · pub struct LedgerStorage { /* private fields */ }
Implementations§
source§impl LedgerStorage
impl LedgerStorage
pub async fn new( read_only: bool, timeout: Option<Duration>, credential_path: Option<String> ) -> Result<Self>
pub fn new_for_emulator( instance_name: &str, app_profile_id: &str, endpoint: &str, timeout: Option<Duration> ) -> Result<Self>
pub async fn new_with_config(config: LedgerStorageConfig) -> Result<Self>
pub async fn new_with_stringified_credential(credential: String) -> Result<Self>
sourcepub async fn get_first_available_block(&self) -> Result<Option<Slot>>
pub async fn get_first_available_block(&self) -> Result<Option<Slot>>
Return the available slot that contains a block
sourcepub async fn get_confirmed_blocks(
&self,
start_slot: Slot,
limit: usize
) -> Result<Vec<Slot>>
pub async fn get_confirmed_blocks( &self, start_slot: Slot, limit: usize ) -> Result<Vec<Slot>>
Fetch the next slots after the provided slot that contains a block
start_slot: slot to start the search from (inclusive) limit: stop after this many slots have been found
pub async fn get_confirmed_blocks_with_data<'a>( &self, slots: &'a [Slot] ) -> Result<impl Iterator<Item = (Slot, ConfirmedBlock)> + 'a>
sourcepub async fn get_confirmed_block(&self, slot: Slot) -> Result<ConfirmedBlock>
pub async fn get_confirmed_block(&self, slot: Slot) -> Result<ConfirmedBlock>
Fetch the confirmed block from the desired slot
sourcepub async fn confirmed_block_exists(&self, slot: Slot) -> Result<bool>
pub async fn confirmed_block_exists(&self, slot: Slot) -> Result<bool>
Does the confirmed block exist in the Bigtable
sourcepub async fn get_entries(
&self,
slot: Slot
) -> Result<impl Iterator<Item = EntrySummary>>
pub async fn get_entries( &self, slot: Slot ) -> Result<impl Iterator<Item = EntrySummary>>
Fetches a vector of block entries via a multirow fetch
pub async fn get_signature_status( &self, signature: &Signature ) -> Result<TransactionStatus>
pub async fn get_confirmed_transactions( &self, signatures: &[Signature] ) -> Result<Vec<ConfirmedTransactionWithStatusMeta>>
sourcepub async fn get_confirmed_transaction(
&self,
signature: &Signature
) -> Result<Option<ConfirmedTransactionWithStatusMeta>>
pub async fn get_confirmed_transaction( &self, signature: &Signature ) -> Result<Option<ConfirmedTransactionWithStatusMeta>>
Fetch a confirmed transaction
sourcepub async fn get_confirmed_signatures_for_address(
&self,
address: &Pubkey,
before_signature: Option<&Signature>,
until_signature: Option<&Signature>,
limit: usize
) -> Result<Vec<(ConfirmedTransactionStatusWithSignature, u32)>>
pub async fn get_confirmed_signatures_for_address( &self, address: &Pubkey, before_signature: Option<&Signature>, until_signature: Option<&Signature>, limit: usize ) -> Result<Vec<(ConfirmedTransactionStatusWithSignature, u32)>>
Get confirmed signatures for the provided address, in descending ledger order
address: address to search for before_signature: start with the first signature older than this one until_signature: end with the last signature more recent than this one limit: stop after this many signatures; if limit==0, all records in the table will be read
sourcepub async fn upload_confirmed_block(
&self,
slot: Slot,
confirmed_block: VersionedConfirmedBlock
) -> Result<()>
pub async fn upload_confirmed_block( &self, slot: Slot, confirmed_block: VersionedConfirmedBlock ) -> Result<()>
Upload a new confirmed block and associated meta data.
pub async fn upload_confirmed_block_with_entries( &self, slot: Slot, confirmed_block: VersionedConfirmedBlockWithEntries ) -> Result<()>
pub async fn delete_confirmed_block( &self, slot: Slot, dry_run: bool ) -> Result<()>
Trait Implementations§
source§impl Clone for LedgerStorage
impl Clone for LedgerStorage
source§fn clone(&self) -> LedgerStorage
fn clone(&self) -> LedgerStorage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for LedgerStorage
impl !RefUnwindSafe for LedgerStorage
impl Send for LedgerStorage
impl Sync for LedgerStorage
impl Unpin for LedgerStorage
impl !UnwindSafe for LedgerStorage
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request