Struct actix_web_lab::extract::SwapData
source · pub struct SwapData<T> { /* private fields */ }
Expand description
A wrapper around ArcSwap
that can be used as an extractor.
Can serve as a replacement for Data<RwLock<T>>
in certain situations.
Currently exposes some internals of arc-swap
and may change in the future.
Implementations§
Trait Implementations§
source§impl<T: 'static> FromRequest for SwapData<T>
impl<T: 'static> FromRequest for SwapData<T>
§type Future = Ready<Result<SwapData<T>, <SwapData<T> as FromRequest>::Error>>
type Future = Ready<Result<SwapData<T>, <SwapData<T> as FromRequest>::Error>>
Future that resolves to a
Self
. Read moresource§fn from_request(req: &HttpRequest, _pl: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, _pl: &mut Payload) -> Self::Future
Create a
Self
from request parts asynchronously.Auto Trait Implementations§
impl<T> RefUnwindSafe for SwapData<T>where T: RefUnwindSafe,
impl<T> Send for SwapData<T>where T: Send + Sync,
impl<T> Sync for SwapData<T>where T: Send + Sync,
impl<T> Unpin for SwapData<T>
impl<T> UnwindSafe for SwapData<T>where T: RefUnwindSafe,
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