pub struct AccessControlBuilder { /* private fields */ }
Expand description
Convenience builder pattern
Implementations
sourceimpl AccessControlBuilder
impl AccessControlBuilder
sourcepub fn allow_all_hosts(self) -> Self
pub fn allow_all_hosts(self) -> Self
Allow all hosts.
sourcepub fn allow_all_origins(self) -> Self
pub fn allow_all_origins(self) -> Self
Allow all origins.
sourcepub fn allow_all_headers(self) -> Self
pub fn allow_all_headers(self) -> Self
Allow all headers.
sourcepub fn set_allowed_hosts<List, H>(self, list: List) -> Result<Self, Error> where
List: IntoIterator<Item = H>,
H: Into<Host>,
pub fn set_allowed_hosts<List, H>(self, list: List) -> Result<Self, Error> where
List: IntoIterator<Item = H>,
H: Into<Host>,
Configure allowed hosts.
Default - allow all.
sourcepub fn set_allowed_origins<Origin, List>(
self,
list: List
) -> Result<Self, Error> where
List: IntoIterator<Item = Origin>,
Origin: Into<AccessControlAllowOrigin>,
pub fn set_allowed_origins<Origin, List>(
self,
list: List
) -> Result<Self, Error> where
List: IntoIterator<Item = Origin>,
Origin: Into<AccessControlAllowOrigin>,
Configure allowed origins.
Default - allow all.
sourcepub fn set_allowed_headers<Header, List>(
self,
list: List
) -> Result<Self, Error> where
List: IntoIterator<Item = Header>,
Header: Into<String>,
pub fn set_allowed_headers<Header, List>(
self,
list: List
) -> Result<Self, Error> where
List: IntoIterator<Item = Header>,
Header: Into<String>,
Configure allowed CORS headers.
Default - allow all.
sourcepub fn continue_on_invalid_cors(self, continue_on_invalid_cors: bool) -> Self
pub fn continue_on_invalid_cors(self, continue_on_invalid_cors: bool) -> Self
Enable or disable to continue with invalid CORS.
Default: false.
sourcepub fn build(self) -> AccessControl
pub fn build(self) -> AccessControl
Build.
Trait Implementations
sourceimpl Debug for AccessControlBuilder
impl Debug for AccessControlBuilder
Auto Trait Implementations
impl RefUnwindSafe for AccessControlBuilder
impl Send for AccessControlBuilder
impl Sync for AccessControlBuilder
impl Unpin for AccessControlBuilder
impl UnwindSafe for AccessControlBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more