pub struct Session {
pub shared: Shared,
/* private fields */
}Fields§
Implementations§
Source§impl Session
impl Session
pub fn new(host: impl Into<String>) -> Self
pub fn with_decompression( host: impl Into<String>, policy: DecompressionPolicy, ) -> Self
pub fn max_response_body(&mut self, cap: usize) -> &mut Self
pub fn with_max_redirects(self, max: u32) -> Self
pub fn with_retry(self, retry: RetryPolicy) -> Self
pub fn with_idle_timeout(self, idle: Duration) -> Self
pub fn with_request_timeout(self, dur: Duration) -> Self
Trait Implementations§
Source§impl Session for Session
impl Session for Session
type Codec = Codec
type ConnState = ConnState
fn codec(&self) -> &Codec
fn connect(&mut self, ctx: &mut Ctx<'_, Self>)
fn response(&mut self, head: Head, ctx: &mut Ctx<'_, Self>)
fn disconnect(&mut self, ctx: &mut Ctx<'_, Self>)
fn flush_trailer(&mut self, ctx: &mut Ctx<'_, Self>)
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl !Send for Session
impl !Sync for Session
impl !UnwindSafe for Session
impl Freeze for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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