Skip to content

Endpoint::new Fixme comment #822

@elpiel

Description

@elpiel

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

// 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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions