Struct reqwest_cookie_store::CookieStoreRwLock
source · pub struct CookieStoreRwLock(/* private fields */);
Expand description
A cookie_store::CookieStore
wrapped internally by a std::sync::RwLock
, suitable for use in
async/concurrent contexts.
Implementations§
source§impl CookieStoreRwLock
impl CookieStoreRwLock
sourcepub const fn new(cookie_store: CookieStore) -> CookieStoreRwLock
pub const fn new(cookie_store: CookieStore) -> CookieStoreRwLock
Create a new CookieStoreRwLock
from an existing cookie_store::CookieStore
.
sourcepub fn read(
&self
) -> Result<RwLockReadGuard<'_, CookieStore>, PoisonError<RwLockReadGuard<'_, CookieStore>>>
pub fn read( &self ) -> Result<RwLockReadGuard<'_, CookieStore>, PoisonError<RwLockReadGuard<'_, CookieStore>>>
Lock and get a read (non-exclusive) handle to the contained cookie_store::CookieStore
.
sourcepub fn write(
&self
) -> Result<RwLockWriteGuard<'_, CookieStore>, PoisonError<RwLockWriteGuard<'_, CookieStore>>>
pub fn write( &self ) -> Result<RwLockWriteGuard<'_, CookieStore>, PoisonError<RwLockWriteGuard<'_, CookieStore>>>
Lock and get a write (exclusive) handle to the contained cookie_store::CookieStore
.
sourcepub fn into_inner(self) -> LockResult<CookieStore>
pub fn into_inner(self) -> LockResult<CookieStore>
Consume this CookieStoreRwLock
, returning the underlying cookie_store::CookieStore
Trait Implementations§
source§impl CookieStore for CookieStoreRwLock
impl CookieStore for CookieStoreRwLock
Store a set of Set-Cookie header values received from
url
Get any Cookie values in the store for
url
source§impl Debug for CookieStoreRwLock
impl Debug for CookieStoreRwLock
source§impl Default for CookieStoreRwLock
impl Default for CookieStoreRwLock
source§fn default() -> Self
fn default() -> Self
Create a new, empty CookieStoreRwLock
.
source§impl<'de> Deserialize<'de> for CookieStoreRwLock
impl<'de> Deserialize<'de> for CookieStoreRwLock
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !Freeze for CookieStoreRwLock
impl RefUnwindSafe for CookieStoreRwLock
impl Send for CookieStoreRwLock
impl Sync for CookieStoreRwLock
impl Unpin for CookieStoreRwLock
impl UnwindSafe for CookieStoreRwLock
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