grpc / grpc/grpc-rust

Loosen visibility for CompressionEncoding utilities

Open
#1,991 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## Feature Request

### Crates

`tonic`

### Motivation

Code re-use.

### Proposal

This is an unconventional use of `tonic`, but I find myself wanting to use utilities in [`tonic/src/codec/compression.rs`](https://github.com/hyperium/tonic/blob/master/tonic/src/codec/compression.rs) such as [`CompressionEncoding::from_encoding_header`](https://github.com/hyperium/tonic/blob/0964cb24164d250ad0980edf8470a834d0df228d/tonic/src/codec/compression.rs#L122) and [`decompress`](https://github.com/hyperium/tonic/blob/0964cb24164d250ad0980edf8470a834d0df228d/tonic/src/codec/compression.rs#L238), but these functions are not public. Is there a strong objection to making these functions public? I know people would prefer to keep the API contract as small as possible, but copy-pasting this logic just doesn't feel right. More than happy to submit the PR if it would be approvable.

### Alternatives

I suppose I could just copy and paste the code into another crate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.