[][src]Struct user_agent::Session

pub struct Session<C: SessionClient> {
    pub client: C,
    pub store: CookieStore,
}

Fields

client: Cstore: 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>, Error> where
    R: BufRead,
    F: Fn(&str) -> Result<Cookie<'static>, E>,
    Error: From<E>, 
[src]

pub fn load_json<R: BufRead>(client: C, reader: R) -> Result<Session<C>, Error>
[src]

pub fn save<W, E, F>(
    &self,
    writer: &mut W,
    cookie_to_string: F
) -> Result<(), Error> where
    W: Write,
    F: Fn(&Cookie) -> Result<String, E>,
    Error: From<E>, 
[src]

pub fn save_json<W: Write>(&self, writer: &mut W) -> Result<(), Error>
[src]

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]

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]

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]

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]

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]

pub fn get<U>(
    &mut self,
    url: U
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
    U: IntoUrl, 
[src]

pub fn put<U>(
    &mut self,
    url: U
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
    U: IntoUrl, 
[src]

pub fn head<U>(
    &mut self,
    url: U
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
    U: IntoUrl, 
[src]

pub fn delete<U>(
    &mut self,
    url: U
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
    U: IntoUrl, 
[src]

pub fn post<U>(
    &mut self,
    url: U
) -> Result<<C as SessionClient>::Response, <C as SessionClient>::SendError> where
    U: IntoUrl, 
[src]

Auto Trait Implementations

impl<C> Send for Session<C> where
    C: Send

impl<C> Sync for Session<C> where
    C: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Erased for T