pub struct HttpServerConfig { /* private fields */ }Implementations§
Source§impl HttpServerConfig
impl HttpServerConfig
pub fn new(server_addr: impl Into<String>, port: u16) -> Self
pub fn allow_origins(self, origin: Vec<String>) -> Self
pub fn allow_any_origin(self) -> Self
pub fn allow_methods(self, methods: Vec<String>) -> Self
pub fn allow_any_methods(self) -> Self
pub fn allow_headers(self, headers: Vec<String>) -> Self
pub fn allow_any_header(self) -> Self
pub fn expose_headers(self, headers: Vec<String>) -> Self
pub fn expose_any_header(self) -> Self
pub fn max_age(self, age: usize) -> Self
pub fn support_credentials(self, support: bool) -> Self
Trait Implementations§
Source§impl Clone for HttpServerConfig
impl Clone for HttpServerConfig
Source§fn clone(&self) -> HttpServerConfig
fn clone(&self) -> HttpServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpServerConfig
impl RefUnwindSafe for HttpServerConfig
impl Send for HttpServerConfig
impl Sync for HttpServerConfig
impl Unpin for HttpServerConfig
impl UnwindSafe for HttpServerConfig
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