pub struct HttpsServerBuilder { /* private fields */ }Expand description
HTTPS 服务器构建器
用于构建和配置 HTTPS 服务器。
Implementations§
Source§impl HttpsServerBuilder
impl HttpsServerBuilder
Sourcepub fn addr(self, addr: SocketAddr) -> Self
pub fn addr(self, addr: SocketAddr) -> Self
设置服务器监听地址
Sourcepub fn service_name(self, name: impl Into<String>) -> Self
pub fn service_name(self, name: impl Into<String>) -> Self
设置服务名称
Sourcepub fn merge_router(self, router: Router) -> Self
pub fn merge_router(self, router: Router) -> Self
合并路由
Sourcepub fn http_version(self, version: HttpVersion) -> Self
pub fn http_version(self, version: HttpVersion) -> Self
设置 HTTP 版本配置
Sourcepub fn http2_config(self, config: Http2Config) -> Self
pub fn http2_config(self, config: Http2Config) -> Self
设置 HTTP/2 配置
Sourcepub fn http3_config(self, config: Http3Config) -> Self
pub fn http3_config(self, config: Http3Config) -> Self
设置 HTTP/3 配置
Sourcepub fn tls_config(self, config: TlsConfig) -> Self
pub fn tls_config(self, config: TlsConfig) -> Self
设置 TLS 配置
Sourcepub fn build(self) -> HttpsServer
pub fn build(self) -> HttpsServer
构建 HTTPS 服务器
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpsServerBuilder
impl RefUnwindSafe for HttpsServerBuilder
impl Send for HttpsServerBuilder
impl Sync for HttpsServerBuilder
impl Unpin for HttpsServerBuilder
impl UnsafeUnpin for HttpsServerBuilder
impl UnwindSafe for HttpsServerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more