[−][src]Struct user_agent::Session
Fields
client: C
store: CookieStore
Methods
impl<C: SessionClient> Session<C>
[src]
pub fn new(client: C) -> Self
[src]
pub fn load<R, E, F>(
client: C,
reader: R,
cookie_from_str: F
) -> Result<Session<C>, Box<dyn Error + Send + Sync>> where
R: BufRead,
F: Fn(&str) -> Result<Cookie<'static>, E>,
E: Error + Send + Sync + 'static,
[src]
client: C,
reader: R,
cookie_from_str: F
) -> Result<Session<C>, Box<dyn Error + Send + Sync>> where
R: BufRead,
F: Fn(&str) -> Result<Cookie<'static>, E>,
E: Error + Send + Sync + 'static,
pub fn load_json<R: BufRead>(
client: C,
reader: R
) -> Result<Session<C>, Box<dyn Error + Send + Sync>>
[src]
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>> where
W: Write,
F: Fn(&Cookie) -> Result<String, E>,
E: Error + Send + Sync + 'static,
[src]
&self,
writer: &mut W,
cookie_to_string: F
) -> Result<(), Box<dyn Error + Send + Sync>> where
W: Write,
F: Fn(&Cookie) -> Result<String, E>,
E: Error + Send + Sync + 'static,
pub fn save_json<W: Write>(
&self,
writer: &mut W
) -> Result<(), Box<dyn Error + Send + Sync>>
[src]
&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> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
[src]
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
pub fn put_with<U, P>(
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
[src]
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
pub fn head_with<U, P>(
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
[src]
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
pub fn delete_with<U, P>(
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
[src]
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
pub fn post_with<U, P>(
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
[src]
&mut self,
url: U,
prepare: P
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
P: FnOnce(<C as SessionClient>::Request) -> <C as SessionClient>::Request,
U: IntoUrl,
pub fn get<U>(
&mut self,
url: U
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
U: IntoUrl,
[src]
&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,
[src]
&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,
[src]
&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,
[src]
&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,
[src]
&mut self,
url: U
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
U: IntoUrl,
Auto Trait Implementations
impl<C> RefUnwindSafe for Session<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> Send for Session<C> where
C: Send,
C: Send,
impl<C> Sync for Session<C> where
C: Sync,
C: Sync,
impl<C> Unpin for Session<C> where
C: Unpin,
C: Unpin,
impl<C> UnwindSafe for Session<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,