typedb_protocol::type_db_server

Trait TypeDb

source
pub trait TypeDb:
    Send
    + Sync
    + 'static {
    type transactionStream: Stream<Item = Result<Server, Status>> + Send + 'static;

    // Required methods
    fn connection_open<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn servers_all<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn databases_get<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn databases_all<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn databases_contains<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn databases_create<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn database_schema<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn database_type_schema<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn database_delete<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Req>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Res>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn transaction<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<Client>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::transactionStream>, 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 TypeDbServer.

Required Associated Types§

source

type transactionStream: Stream<Item = Result<Server, Status>> + Send + 'static

Server streaming response type for the transaction method.

Required Methods§

source

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

Connection API

source

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

// Server Manager API

source

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

Database Manager API

source

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

source

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

source

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

source

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

Database API

source

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

source

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

source

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

Transaction Streaming API Opens a bi-directional stream representing a stateful transaction, streaming requests and responses back-and-forth. The first transaction client message must be {Transaction.Open.Req}. Closing the stream closes the transaction.

Implementors§