Struct actix_web_location::LocationConfig
source · [−]pub struct LocationConfig { /* private fields */ }
Expand description
Configuration for how to determine location from a request.
Implementations
sourceimpl LocationConfig
impl LocationConfig
sourcepub fn with_provider<P: Provider + 'static>(self, provider: P) -> Self
pub fn with_provider<P: Provider + 'static>(self, provider: P) -> Self
Add a provider to this configuration. It will be wrapped into an Arc<Box<T>>
.
sourcepub fn with_metrics<M: CountedExt + Send + Sync + 'static>(
self,
metrics: M
) -> Self
pub fn with_metrics<M: CountedExt + Send + Sync + 'static>(
self,
metrics: M
) -> Self
Add a metrics sink to this configuration. It will be wrapped into an Arc<Option<Box<T>>>
.
Trait Implementations
sourceimpl Clone for LocationConfig
impl Clone for LocationConfig
sourcefn clone(&self) -> LocationConfig
fn clone(&self) -> LocationConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for LocationConfig
impl Default for LocationConfig
sourcefn default() -> LocationConfig
fn default() -> LocationConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for LocationConfig
impl Send for LocationConfig
impl Sync for LocationConfig
impl Unpin for LocationConfig
impl !UnwindSafe for LocationConfig
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> 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