pub struct HttpsServerBuilder<S = ()> { /* private fields */ }Expand description
HTTPS 服务器构建器
用于构建和配置 HTTPS 服务器。
Implementations§
Source§impl<S> HttpsServerBuilder<S>
impl<S> HttpsServerBuilder<S>
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<S>) -> Self
pub fn merge_router(self, router: Router<S>) -> 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<S>
pub fn build(self) -> HttpsServer<S>
构建 HTTPS 服务器
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for HttpsServerBuilder<S>where
S: Freeze,
impl<S = ()> !RefUnwindSafe for HttpsServerBuilder<S>
impl<S> Send for HttpsServerBuilder<S>where
S: Send,
impl<S> Sync for HttpsServerBuilder<S>where
S: Sync,
impl<S> Unpin for HttpsServerBuilder<S>where
S: Unpin,
impl<S> UnsafeUnpin for HttpsServerBuilder<S>where
S: UnsafeUnpin,
impl<S = ()> !UnwindSafe for HttpsServerBuilder<S>
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