Struct insta::CookieStoreMutex
pub struct CookieStoreMutex(/* private fields */);
Expand description
A cookie_store::CookieStore
wrapped internally by a std::sync::Mutex
, suitable for use in
async/concurrent contexts.
Implementations§
§impl CookieStoreMutex
impl CookieStoreMutex
pub fn new(cookie_store: CookieStore) -> CookieStoreMutex
pub fn new(cookie_store: CookieStore) -> CookieStoreMutex
Create a new CookieStoreMutex
from an existing cookie_store::CookieStore
.
pub fn lock(
&self
) -> Result<MutexGuard<'_, CookieStore>, PoisonError<MutexGuard<'_, CookieStore>>>
pub fn lock( &self ) -> Result<MutexGuard<'_, CookieStore>, PoisonError<MutexGuard<'_, CookieStore>>>
Lock and get a handle to the contained cookie_store::CookieStore
.
pub fn into_inner(self) -> Result<CookieStore, PoisonError<CookieStore>>
pub fn into_inner(self) -> Result<CookieStore, PoisonError<CookieStore>>
Consumes this CookieStoreMutex
, returning the underlying cookie_store::CookieStore
Trait Implementations§
§impl CookieStore for CookieStoreMutex
impl CookieStore for CookieStoreMutex
Store a set of Set-Cookie header values received from
url
Get any Cookie values in the store for
url
§impl Debug for CookieStoreMutex
impl Debug for CookieStoreMutex
§impl Default for CookieStoreMutex
impl Default for CookieStoreMutex
§fn default() -> CookieStoreMutex
fn default() -> CookieStoreMutex
Create a new, empty CookieStoreMutex
Auto Trait Implementations§
impl RefUnwindSafe for CookieStoreMutex
impl Send for CookieStoreMutex
impl Sync for CookieStoreMutex
impl Unpin for CookieStoreMutex
impl UnwindSafe for CookieStoreMutex
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