Skip to main content

ProtocolInputExt

Trait ProtocolInputExt 

pub trait ProtocolInputExt {
    // Required method
    fn protocol(&self) -> Option<Protocol>;

    // Provided method
    fn protocol_default_port(&self) -> Option<u16> { ... }
}
Available on crate feature net only.
Expand description

Read the application-layer Protocol (scheme) of a service input.

Required Methods§

fn protocol(&self) -> Option<Protocol>

The application protocol, or None if it can’t be determined.

Provided Methods§

fn protocol_default_port(&self) -> Option<u16>

The default port of the resolved Protocol (e.g. 443 for HTTPS), or None if the protocol is unknown or portless.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl<T> ProtocolInputExt for &T
where T: ProtocolInputExt + ?Sized,

§

fn protocol(&self) -> Option<Protocol>

Implementors§

§

impl ProtocolInputExt for Parts

§

impl ProtocolInputExt for rama::tcp::client::Request

§

impl<Body> ProtocolInputExt for rama::http::Request<Body>