-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Milestone
Description
Feature Request
As a user of the crate, I can say that the Endpoint::new() assoc. function is very handy.
Crates
tonic
Motivation
While the from_shared returns an InvalidUri error directly, the fn new() returns tonic::transport::Error.
When creating an endpoint I'd like to return tonic::transport::Error directly or use it to build my own error if needed.
Proposal
Unhide Entrypoint::new() from the docs.
Alternatives
Code
tonic/tonic/src/transport/channel/endpoint.rs
Lines 46 to 49 in debcafe
| // FIXME: determine if we want to expose this or not. This is really | |
| // just used in codegen for a shortcut. | |
| #[doc(hidden)] | |
| pub fn new<D>(dst: D) -> Result<Self, Error> |