volo icon indicating copy to clipboard operation
volo copied to clipboard

Use GAT in volo-grpc `SendEntryMessage`

Open LYF1999 opened this issue 3 years ago • 2 comments

Feature Request

Crates

Motivation

The definition of SendEntryMessage can be better with GAT

pub trait SendEntryMessage {
    fn into_body(
        self,
        compression_config: Option<CompressionEncoding>,
    ) -> crate::BoxStream<'static, Result<Bytes, crate::Status>>;
}

with GAT

pub trait SendEntryMessage {
    type Body: Stream<Item = Result<Bytes, crate::Status>> + Send
    fn into_body(
        self,
        compression_config: Option<CompressionEncoding>,
    ) -> Self::Body;
}

LYF1999 avatar Dec 06 '22 09:12 LYF1999