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
sourceimpl<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 moresourcefn 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.sourcefn extract(req: &HttpRequest) -> Self::Future
fn extract(req: &HttpRequest) -> Self::Future
Create a
Self from request head asynchronously. Read moreAuto 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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