pub struct Server<S> { /* private fields */ }Implementations§
Source§impl<S> Server<S>
impl<S> Server<S>
pub async fn bind( ip: &str, router: Router<S>, doc_root: impl AsRef<Path> + Debug, ) -> Result<Self, Error>
pub async fn bind_tls( ip: &str, cert: &Path, key: &Path, router: Router<S>, doc_root: impl AsRef<Path> + Debug, ) -> Result<Self, Error>
pub async fn bind_tls_alpn( ip: &str, router: Router<S>, doc_root: impl AsRef<Path> + Debug, domains: impl IntoIterator<Item = impl AsRef<str>>, email: &str, ) -> Result<Self, Error>
pub fn virtual_hosts(&self) -> Arc<RwLock<HashMap<String, VirtualHost<S>>>>
pub async fn add_virtual_host(&mut self, virtual_host: VirtualHost<S>)
pub async fn accept(&self) -> Result<Connection>
pub async fn serve(&self) -> Result<()>
Auto Trait Implementations§
impl<S> !Freeze for Server<S>
impl<S> !RefUnwindSafe for Server<S>
impl<S> Send for Server<S>
impl<S> Sync for Server<S>
impl<S> Unpin for Server<S>
impl<S> !UnwindSafe for Server<S>
Blanket Implementations§
Source§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
Source§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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