pub struct Session(/* private fields */);Expand description
An isolated routing and statistics scope. Clones share settings. A new session uses the
native provider and does not inherit global interception. Default clients use global().
Implementations§
Source§impl Session
impl Session
pub fn new() -> Self
pub fn global() -> Self
Sourcepub fn set_provider(&self, provider: Provider)
pub fn set_provider(&self, provider: Provider)
Applies to subsequent requests, including clients that already exist.
Sourcepub fn set_simulation(&self, simulation: Option<Simulation>)
pub fn set_simulation(&self, simulation: Option<Simulation>)
Enable/disable interception. Active transfers keep their selected handler and provider.
pub fn statistics(&self) -> Statistics
Sourcepub fn transfers(&self) -> Vec<TransferStatistics>
pub fn transfers(&self) -> Vec<TransferStatistics>
The latest 256 exchanges/sockets, including in-progress operations; totals are unbounded counters, but history storage is bounded. These are not physical TCP connection counts.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Session
impl Freeze for Session
impl Move for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe 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