Skip to main content

LedgerService

Trait LedgerService 

Source
pub trait LedgerService:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn get_service_info<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetServiceInfoRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetServiceInfoResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_object<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetObjectRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetObjectResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn batch_get_objects<'life0, 'async_trait>(
        &'life0 self,
        request: Request<BatchGetObjectsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetObjectsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn list_object_versions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListObjectVersionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListObjectVersionsResponse>>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_transaction<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetTransactionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetTransactionResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn batch_get_transactions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<BatchGetTransactionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetTransactionsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_checkpoint<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetCheckpointRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetCheckpointResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_epoch<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetEpochRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetEpochResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_protocol_config<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetProtocolConfigRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetProtocolConfigResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn list_checkpoints<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListCheckpointsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListCheckpointsResponse>>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn list_transactions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListTransactionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListTransactionsResponse>>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn list_events<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListEventsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListEventsResponse>>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with LedgerServiceServer.

Provided Methods§

Source

fn get_service_info<'life0, 'async_trait>( &'life0 self, request: Request<GetServiceInfoRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetServiceInfoResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query the service for general information about its current state.

Source

fn get_object<'life0, 'async_trait>( &'life0 self, request: Request<GetObjectRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetObjectResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn batch_get_objects<'life0, 'async_trait>( &'life0 self, request: Request<BatchGetObjectsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetObjectsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_object_versions<'life0, 'async_trait>( &'life0 self, request: Request<ListObjectVersionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListObjectVersionsResponse>>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List one object’s history: its live versions and the versions at which it was deleted or wrapped, in ascending or descending version order, one per response frame, paged by cursor.

Servers that prune history, such as fullnodes, list the versions they retain; see ListObjectVersionsRequest.

Source

fn get_transaction<'life0, 'async_trait>( &'life0 self, request: Request<GetTransactionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetTransactionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn batch_get_transactions<'life0, 'async_trait>( &'life0 self, request: Request<BatchGetTransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetTransactionsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_checkpoint<'life0, 'async_trait>( &'life0 self, request: Request<GetCheckpointRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetCheckpointResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_epoch<'life0, 'async_trait>( &'life0 self, request: Request<GetEpochRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetEpochResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_protocol_config<'life0, 'async_trait>( &'life0 self, request: Request<GetProtocolConfigRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetProtocolConfigResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the protocol config of a protocol version.

With version unset, it returns the config of the current protocol version: on fullnodes, the version of their live system state; on kv-rpc, the version in force at the highest checkpoint it has indexed. A version above the current one fails with NOT_FOUND. kv-rpc also answers NOT_FOUND for a version the chain skipped: a protocol upgrade can advance the version by more than one, and a skipped version has no config. Fullnodes compute configs from their own binary and serve every version up to the current one.

A server not set up to serve this method fails with UNIMPLEMENTED and reason NOT_SERVED_HERE.

Source

fn list_checkpoints<'life0, 'async_trait>( &'life0 self, request: Request<ListCheckpointsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListCheckpointsResponse>>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List checkpoints matching the provided filters.

Checkpoints are returned in ascending or descending checkpoint sequence number order according to the query options ordering. A checkpoint matches if any transaction it contains satisfies the filter.

Source

fn list_transactions<'life0, 'async_trait>( &'life0 self, request: Request<ListTransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListTransactionsResponse>>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List transactions matching the provided filters.

Transactions are returned in ascending or descending transaction sequence order according to the query options ordering.

Source

fn list_events<'life0, 'async_trait>( &'life0 self, request: Request<ListEventsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BoxStream<ListEventsResponse>>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List events matching the provided filters.

Events are returned in ascending or descending packed event sequence order according to the query options ordering.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§