pub struct AccessControlBuilder { /* private fields */ }
Expand description
Convenience builder pattern
Implementations
sourceimpl AccessControlBuilder
impl AccessControlBuilder
sourcepub fn new() -> AccessControlBuilder
pub fn new() -> AccessControlBuilder
Create a new builder for AccessControl
.
sourcepub fn allow_all_hosts(self) -> AccessControlBuilder
pub fn allow_all_hosts(self) -> AccessControlBuilder
Allow all hosts.
sourcepub fn allow_all_origins(self) -> AccessControlBuilder
pub fn allow_all_origins(self) -> AccessControlBuilder
Allow all origins.
sourcepub fn allow_all_headers(self) -> AccessControlBuilder
pub fn allow_all_headers(self) -> AccessControlBuilder
Allow all headers.
sourcepub fn set_allowed_hosts<List, H>(
self,
list: List
) -> Result<AccessControlBuilder, Error> where
List: IntoIterator<Item = H>,
H: Into<String>,
pub fn set_allowed_hosts<List, H>(
self,
list: List
) -> Result<AccessControlBuilder, Error> where
List: IntoIterator<Item = H>,
H: Into<String>,
Configure allowed hosts.
Default - allow all.
sourcepub fn set_allowed_origins<Origin, List>(
self,
list: List
) -> Result<AccessControlBuilder, Error> where
List: IntoIterator<Item = Origin>,
Origin: Into<String>,
pub fn set_allowed_origins<Origin, List>(
self,
list: List
) -> Result<AccessControlBuilder, Error> where
List: IntoIterator<Item = Origin>,
Origin: Into<String>,
Configure allowed origins.
Default - allow all.
sourcepub fn set_allowed_headers<Header, List>(
self,
list: List
) -> Result<AccessControlBuilder, Error> where
List: IntoIterator<Item = Header>,
Header: Into<String>,
pub fn set_allowed_headers<Header, List>(
self,
list: List
) -> Result<AccessControlBuilder, Error> where
List: IntoIterator<Item = Header>,
Header: Into<String>,
Configure allowed CORS headers.
Default - allow all.
sourcepub fn build(self) -> AccessControl
pub fn build(self) -> AccessControl
Finalize the AccessControl
settings.
Trait Implementations
sourceimpl Debug for AccessControlBuilder
impl Debug for AccessControlBuilder
sourceimpl Default for AccessControlBuilder
impl Default for AccessControlBuilder
sourcefn default() -> AccessControlBuilder
fn default() -> AccessControlBuilder
Returns the “default value” for a type. Read more
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>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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
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