ConnectRequest

Trait ConnectRequest 

Source
pub trait ConnectRequest {
    // Required methods
    fn connect_protocol_version(&self) -> Option<&str>;
    fn scheme(&self) -> Option<&Scheme>;
    fn authority(&self) -> Option<&Authority>;
    fn path(&self) -> &str;
    fn message_codec(&self) -> Result<&str, Error>;
    fn timeout(&self) -> Option<Duration>;
    fn content_encoding(&self) -> Option<&str>;
    fn accept_encoding(&self) -> impl Iterator<Item = &str>;
    fn metadata(&self) -> &impl Metadata;
    fn validate(&self) -> Result<(), Error>;

    // Provided method
    fn protobuf_rpc_parts(&self) -> Option<(&str, &str, &str)> { ... }
}
Expand description

A Connect request.

Required Methods§

Source

fn connect_protocol_version(&self) -> Option<&str>

Returns the connect protocol version.

Source

fn scheme(&self) -> Option<&Scheme>

Returns the URI scheme.

Source

fn authority(&self) -> Option<&Authority>

Returns the URI authority.

Source

fn path(&self) -> &str

Returns the URI path.

Source

fn message_codec(&self) -> Result<&str, Error>

Returns the message codec.

Source

fn timeout(&self) -> Option<Duration>

Returns the timeout.

Source

fn content_encoding(&self) -> Option<&str>

Returns the content encoding (e.g. compression).

Source

fn accept_encoding(&self) -> impl Iterator<Item = &str>

Returns the accept encoding(s).

Source

fn metadata(&self) -> &impl Metadata

Returns the metadata.

Source

fn validate(&self) -> Result<(), Error>

Validates the request.

Provided Methods§

Source

fn protobuf_rpc_parts(&self) -> Option<(&str, &str, &str)>

Splits a protobuf RPC request path into routing prefix, service name, and method name.

Returns None if the request path does not contain a /.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: HttpConnectRequest> ConnectRequest for T