Struct solana_storage_bigtable::LedgerStorage

source ·
pub struct LedgerStorage { /* private fields */ }

Implementations§

source§

impl LedgerStorage

source

pub async fn new( read_only: bool, timeout: Option<Duration>, credential_path: Option<String> ) -> Result<Self>

source

pub fn new_for_emulator( instance_name: &str, app_profile_id: &str, endpoint: &str, timeout: Option<Duration> ) -> Result<Self>

source

pub async fn new_with_config(config: LedgerStorageConfig) -> Result<Self>

source

pub async fn new_with_stringified_credential(credential: String) -> Result<Self>

source

pub async fn get_first_available_block(&self) -> Result<Option<Slot>>

Return the available slot that contains a block

source

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

source

pub async fn get_confirmed_blocks_with_data<'a>( &self, slots: &'a [Slot] ) -> Result<impl Iterator<Item = (Slot, ConfirmedBlock)> + 'a>

source

pub async fn get_confirmed_block(&self, slot: Slot) -> Result<ConfirmedBlock>

Fetch the confirmed block from the desired slot

source

pub async fn confirmed_block_exists(&self, slot: Slot) -> Result<bool>

Does the confirmed block exist in the Bigtable

source

pub async fn get_entries( &self, slot: Slot ) -> Result<impl Iterator<Item = EntrySummary>>

Fetches a vector of block entries via a multirow fetch

source

pub async fn get_signature_status( &self, signature: &Signature ) -> Result<TransactionStatus>

source

pub async fn get_confirmed_transactions( &self, signatures: &[Signature] ) -> Result<Vec<ConfirmedTransactionWithStatusMeta>>

source

pub async fn get_confirmed_transaction( &self, signature: &Signature ) -> Result<Option<ConfirmedTransactionWithStatusMeta>>

Fetch a confirmed transaction

source

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

source

pub async fn upload_confirmed_block( &self, slot: Slot, confirmed_block: VersionedConfirmedBlock ) -> Result<()>

Upload a new confirmed block and associated meta data.

source

pub async fn upload_confirmed_block_with_entries( &self, slot: Slot, confirmed_block: VersionedConfirmedBlockWithEntries ) -> Result<()>

source

pub async fn delete_confirmed_block( &self, slot: Slot, dry_run: bool ) -> Result<()>

Trait Implementations§

source§

impl Clone for LedgerStorage

source§

fn clone(&self) -> LedgerStorage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> AbiExample for T

source§

default fn example() -> T

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromRef<T> for T
where T: Clone,

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more