pub struct Session<C: SessionClient> {
pub client: C,
pub store: CookieStore,
}Fields§
§client: C§store: CookieStoreImplementations§
Source§impl<C: SessionClient> Session<C>
impl<C: SessionClient> Session<C>
pub fn new(client: C) -> Self
pub fn load<R, E, F>( client: C, reader: R, cookie_from_str: F, ) -> Result<Session<C>, Box<dyn Error + Send + Sync>>
pub fn load_json<R: BufRead>( client: C, reader: R, ) -> Result<Session<C>, Box<dyn Error + Send + Sync>>
pub fn save<W, E, F>( &self, writer: &mut W, cookie_to_string: F, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn save_json<W: Write>( &self, writer: &mut W, ) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn get_with<U, P>( &mut self, url: U, prepare: P, ) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>
pub fn put_with<U, P>( &mut self, url: U, prepare: P, ) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>
pub fn head_with<U, P>( &mut self, url: U, prepare: P, ) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>
pub fn delete_with<U, P>( &mut self, url: U, prepare: P, ) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>
pub fn post_with<U, P>( &mut self, url: U, prepare: P, ) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>
pub fn get<U>(
&mut self,
url: U,
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>where
U: IntoUrl,
pub fn put<U>(
&mut self,
url: U,
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>where
U: IntoUrl,
pub fn head<U>(
&mut self,
url: U,
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>where
U: IntoUrl,
pub fn delete<U>(
&mut self,
url: U,
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>where
U: IntoUrl,
pub fn post<U>(
&mut self,
url: U,
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError>where
U: IntoUrl,
Auto Trait Implementations§
impl<C> Freeze for Session<C>where
C: Freeze,
impl<C> RefUnwindSafe for Session<C>where
C: RefUnwindSafe,
impl<C> Send for Session<C>where
C: Send,
impl<C> Sync for Session<C>where
C: Sync,
impl<C> Unpin for Session<C>where
C: Unpin,
impl<C> UnwindSafe for Session<C>where
C: 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