grpc / grpc/grpc-rust

Make fileds in `GrpcMethod` public.

Open
#1,596 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

Make `service` and `method` static fields public, like this:

```rust
/// A gRPC Method info extension.
#[derive(Debug, Clone)]
pub struct GrpcMethod {
pub service: &'static str,
pub method: &'static str,
}
```

### Motivation

It's often needed for metrics and dumping messages. Some libraries required `Cow<'static, str>` or even `&'static str` for metric an dumping labels.

### Proposal

A see no drawbacks except increasing public interface surface.

### Alternatives

leave as is.

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.