pub struct Builder { /* private fields */ }
Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
pub fn config(self, config: Config) -> Self
pub fn tls_single_cert( self, cert_file: impl AsRef<Path>, private_key_file: impl AsRef<Path>, ) -> Result<Self, Box<dyn Error + Send + Sync>>
pub fn tls_config(self, tls_config: ServerConfig) -> Self
pub fn serve<A, S, ResponseBody>( self, addr: A, service: S, ) -> Result<ServerHandle<SocketAddr>, Box<dyn Error + Send + Sync>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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