Skip to main content

TransactionService

Trait TransactionService 

Source
pub trait TransactionService:
    Send
    + Sync
    + 'static {
    // Required methods
    fn begin<'life0, 'async_trait>(
        &'life0 self,
        request: Request<BeginTransactionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BeginTransactionResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn commit<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TransactionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rollback<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TransactionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, 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 TransactionServiceServer.

Required Methods§

Source

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

Source

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

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§