pub struct SessionBuilder { /* private fields */ }Expand description
Session Builder class.
Usage example:
use wclient::SessionBuilder;
use wclient::config::HttpConfigBuilder;
let config = HttpConfigBuilder::default()
// Set config here
.build();
let session = SessionBuilder::new()
.config(&config)
.build();Implementations§
Source§impl SessionBuilder
impl SessionBuilder
Sourcepub fn new() -> SessionBuilder
pub fn new() -> SessionBuilder
Constructor
Sourcepub fn config(self, data: &HttpConfig) -> SessionBuilder
pub fn config(self, data: &HttpConfig) -> SessionBuilder
Sets the Request configuration
Sets a CookieJar to get/save session cookies, uf not provided defauls is MemCookieJar
pub fn auth(self, auth: Arc<Mutex<dyn AuthManager>>) -> SessionBuilder
Auto Trait Implementations§
impl Freeze for SessionBuilder
impl RefUnwindSafe for SessionBuilder
impl !Send for SessionBuilder
impl !Sync for SessionBuilder
impl Unpin for SessionBuilder
impl UnwindSafe for SessionBuilder
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