Trait Workspace

Source
pub trait Workspace:
    Send
    + Sync
    + 'static {
    type AttachStream: Stream<Item = Result<WorkspaceEvent, Status>> + Send + 'static;

    // Required methods
    fn attach<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::AttachStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_buffer<'life0, 'async_trait>(
        &'life0 self,
        request: Request<BufferNode>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn access_buffer<'life0, 'async_trait>(
        &'life0 self,
        request: Request<BufferNode>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Token>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_buffer<'life0, 'async_trait>(
        &'life0 self,
        request: Request<BufferNode>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_buffers<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BufferTree>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_users<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Empty>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<UserList>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_buffer_users<'life0, 'async_trait>(
        &'life0 self,
        request: Request<BufferNode>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<UserList>, 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 WorkspaceServer.

Required Associated Types§

Source

type AttachStream: Stream<Item = Result<WorkspaceEvent, Status>> + Send + 'static

Server streaming response type for the Attach method.

Required Methods§

Source

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

Attach to a workspace.

Source

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

Create a buffer within the workspace.

Source

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

Access a buffer within the workspace and returns a buffer token for it.

Source

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

Delete a buffer.

Source

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

List buffers in the workspace.

Source

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

List users in the workspace.

Source

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

List users within a given buffer.

Implementors§