pub struct SessionBuilder { /* private fields */ }Expand description
Builds a Session. See Session::builder.
Implementations§
Source§impl SessionBuilder
impl SessionBuilder
Sourcepub fn with_minter(self, minter: Arc<dyn TokenMinter>) -> Self
pub fn with_minter(self, minter: Arc<dyn TokenMinter>) -> Self
Mints proxy tokens through minter, with the default refresh schedule.
Sourcepub fn with_proxy_auth(self, proxy: Arc<ProxyAuth>) -> Self
pub fn with_proxy_auth(self, proxy: Arc<ProxyAuth>) -> Self
Uses an already-built ProxyAuth, for a caller that needs a custom refresh
interval or clock. Wins over Self::with_minter.
Sourcepub fn with_backend(self, backend: SharedBackend) -> Self
pub fn with_backend(self, backend: SharedBackend) -> Self
Replaces the HTTP backend. The seam a simulated transport plugs into.
Sourcepub fn with_port(self, port: u16) -> Self
pub fn with_port(self, port: u16) -> Self
The port the proxy token is scoped to and the port header names.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
How long one non-streaming request may take.
Auto Trait Implementations§
impl !RefUnwindSafe for SessionBuilder
impl !UnwindSafe for SessionBuilder
impl Freeze for SessionBuilder
impl Send for SessionBuilder
impl Sync for SessionBuilder
impl Unpin for SessionBuilder
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.