Feature Request
Crates
tonic
Motivation
The transport::error::Error type is quite opaque, and not amenable to programmatically distinguishing between different types of errors.
Proposal
There is a Kind enum that is currently pub(crate); I suggest making this pub and adding a public accessor to return the Kind.
If forwards-compatibility with potential future variants is a concern, the non_exhaustive attribute can be applied to the enum.
Alternatives
A set of public functions returning bool could be added to cover each type of error: is_transport_error, is_invalid_uri, etc.
Feature Request
Crates
tonicMotivation
The
transport::error::Errortype is quite opaque, and not amenable to programmatically distinguishing between different types of errors.Proposal
There is a
Kindenum that is currentlypub(crate); I suggest making thispuband adding a public accessor to return theKind.If forwards-compatibility with potential future variants is a concern, the
non_exhaustiveattribute can be applied to the enum.Alternatives
A set of public functions returning
boolcould be added to cover each type of error:is_transport_error,is_invalid_uri, etc.