Struct kvarn::PortDescriptor
source · pub struct PortDescriptor { /* private fields */ }
Expand description
Describes port, certificate, and host data for a single port to bind.
See the note at the bottom of Host
for an explanation
about the relationship between Self::new
and Self::unsecure
.
Implementations§
source§impl PortDescriptor
impl PortDescriptor
Creation and configuration.
Used when creating a server.
sourcepub fn http(host_data: Arc<HostCollection>) -> Self
pub fn http(host_data: Arc<HostCollection>) -> Self
Uses the defaults for non-secure HTTP with host_data
sourcepub fn https(host_data: Arc<HostCollection>) -> Self
Available on crate feature https
only.
pub fn https(host_data: Arc<HostCollection>) -> Self
https
only.Uses the defaults for secure HTTP, HTTPS, with host_data
.
Gets a [rustls::ServerConfig
] from HostCollection::make_config()
.