Skip to main content

StreamService

Trait StreamService 

Source
pub trait StreamService:
    Send
    + Sync
    + 'static {
    type ReadStream: Stream<Item = Result<ReadResponse, Status>> + Send + 'static;
    type FollowStream: Stream<Item = Result<ReadResponse, Status>> + Send + 'static;
    type ChildrenStream: Stream<Item = Result<ChildrenResponse, Status>> + Send + 'static;

    // Required methods
    fn inspect_idempotency<'life0, 'async_trait>(
        &'life0 self,
        request: Request<InspectIdempotencyRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<InspectIdempotencyResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn append<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AppendRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<AppendResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn tail<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TailRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<TailResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fork<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ForkRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ForkReceipt>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn trim<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TrimRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<TrimReceipt>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DeleteRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<DeleteReceipt>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn read<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ReadRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ReadStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn follow<'life0, 'async_trait>(
        &'life0 self,
        request: Request<FollowRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::FollowStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn children<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ChildrenRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ChildrenStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn commit<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CommitRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<CommitResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn read_commit<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ReadCommitRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<CommittedEnvelope>, 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 StreamServiceServer.

Required Associated Types§

Source

type ReadStream: Stream<Item = Result<ReadResponse, Status>> + Send + 'static

Server streaming response type for the Read method.

Source

type FollowStream: Stream<Item = Result<ReadResponse, Status>> + Send + 'static

Server streaming response type for the Follow method.

Source

type ChildrenStream: Stream<Item = Result<ChildrenResponse, Status>> + Send + 'static

Server streaming response type for the Children method.

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn read_commit<'life0, 'async_trait>( &'life0 self, request: Request<ReadCommitRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<CommittedEnvelope>, 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§