Struct SessionBuilder

Source
pub struct SessionBuilder { /* private fields */ }
Expand description

A builder-pattern type to construct Session objects.

Implementations§

Source§

impl SessionBuilder

Source

pub fn accept_language(self, accept_language: impl Into<GString>) -> Self

Source

pub fn accept_language_auto(self, accept_language_auto: bool) -> Self

Source

pub fn idle_timeout(self, idle_timeout: u32) -> Self

Source

pub fn local_address(self, local_address: &impl IsA<InetSocketAddress>) -> Self

Source

pub fn max_conns(self, max_conns: i32) -> Self

Source

pub fn max_conns_per_host(self, max_conns_per_host: i32) -> Self

Source

pub fn proxy_resolver(self, proxy_resolver: &impl IsA<ProxyResolver>) -> Self

Source

pub fn remote_connectable( self, remote_connectable: &impl IsA<SocketConnectable>, ) -> Self

Source

pub fn timeout(self, timeout: u32) -> Self

Source

pub fn tls_database(self, tls_database: &impl IsA<TlsDatabase>) -> Self

Source

pub fn tls_interaction(self, tls_interaction: &impl IsA<TlsInteraction>) -> Self

Source

pub fn user_agent(self, user_agent: impl Into<GString>) -> Self

Source

pub fn build(self) -> Session

Build the Session.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.