pub struct CsrfProtectionMiddleware<P: CsrfProtection> { /* private fields */ }
Expand description
An implementation of iron::AroundMiddleware
that provides transparent wrapping of an
application with CSRF protection.
Implementations§
Source§impl<P: CsrfProtection> CsrfProtectionMiddleware<P>
impl<P: CsrfProtection> CsrfProtectionMiddleware<P>
Sourcepub fn new(protect: P, config: CsrfConfig) -> Self
pub fn new(protect: P, config: CsrfConfig) -> Self
Create a new instance of CsrfProtectionMiddleware
from a CsrfProtection
and
CsrfConfig
.
Trait Implementations§
Source§impl<P: CsrfProtection + 'static> AroundMiddleware for CsrfProtectionMiddleware<P>
impl<P: CsrfProtection + 'static> AroundMiddleware for CsrfProtectionMiddleware<P>
Auto Trait Implementations§
impl<P> Freeze for CsrfProtectionMiddleware<P>where
P: Freeze,
impl<P> RefUnwindSafe for CsrfProtectionMiddleware<P>where
P: RefUnwindSafe,
impl<P> Send for CsrfProtectionMiddleware<P>
impl<P> Sync for CsrfProtectionMiddleware<P>
impl<P> Unpin for CsrfProtectionMiddleware<P>where
P: Unpin,
impl<P> UnwindSafe for CsrfProtectionMiddleware<P>where
P: 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
Source§impl<T> PersistentInto<Arc<Mutex<T>>> for T
impl<T> PersistentInto<Arc<Mutex<T>>> for T
Source§fn persistent_into(self) -> Arc<Mutex<T>>
fn persistent_into(self) -> Arc<Mutex<T>>
Convert
self
into a value of type T
.Source§impl<T> PersistentInto<Arc<RwLock<T>>> for T
impl<T> PersistentInto<Arc<RwLock<T>>> for T
Source§fn persistent_into(self) -> Arc<RwLock<T>>
fn persistent_into(self) -> Arc<RwLock<T>>
Convert
self
into a value of type T
.Source§impl<T> PersistentInto<Arc<T>> for T
impl<T> PersistentInto<Arc<T>> for T
Source§fn persistent_into(self) -> Arc<T>
fn persistent_into(self) -> Arc<T>
Convert
self
into a value of type T
.Source§impl<T> PersistentInto<T> for T
impl<T> PersistentInto<T> for T
Source§fn persistent_into(self) -> T
fn persistent_into(self) -> T
Convert
self
into a value of type T
.