pub struct ServerConfig<U = ()> { /* private fields */ }Implementations§
Source§impl<U> ServerConfig<U>
impl<U> ServerConfig<U>
pub fn with_listen_addr(self, listen_addr: impl Into<String>) -> Self
pub fn with_app_data<T>(self, app_data: T) -> ServerConfig<T>
pub fn with_cors(self, cors: CorsConfig) -> Self
pub fn with_tls(self, tls: TlsConfig) -> Self
pub fn build(self) -> Result<ValidatedServerConfig<U>, ServerConfigError>
Trait Implementations§
Source§impl<U: Clone> Clone for ServerConfig<U>
impl<U: Clone> Clone for ServerConfig<U>
Source§fn clone(&self) -> ServerConfig<U>
fn clone(&self) -> ServerConfig<U>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<U: Debug> Debug for ServerConfig<U>
impl<U: Debug> Debug for ServerConfig<U>
Auto Trait Implementations§
impl<U> Freeze for ServerConfig<U>where
U: Freeze,
impl<U> RefUnwindSafe for ServerConfig<U>where
U: RefUnwindSafe,
impl<U> Send for ServerConfig<U>where
U: Send,
impl<U> Sync for ServerConfig<U>where
U: Sync,
impl<U> Unpin for ServerConfig<U>where
U: Unpin,
impl<U> UnsafeUnpin for ServerConfig<U>where
U: UnsafeUnpin,
impl<U> UnwindSafe for ServerConfig<U>where
U: UnwindSafe,
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