Skip to main content

ProtocolInputExt

Trait ProtocolInputExt 

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

    // Provided method
    fn protocol_default_port(&self) -> Option<u16> { ... }
}
Expand description

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

Required Methods§

Source

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

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

Provided Methods§

Source

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§

Source§

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

Implementors§

Source§

impl ProtocolInputExt for ConnectRequest

Available on crate feature std only.