Struct slinger::ConnectorBuilder
source · pub struct ConnectorBuilder { /* private fields */ }Expand description
ConnectorBuilder
Implementations§
source§impl ConnectorBuilder
impl ConnectorBuilder
sourcepub fn hostname_verification(self, value: bool) -> ConnectorBuilder
pub fn hostname_verification(self, value: bool) -> ConnectorBuilder
Controls the use of hostname verification.
Defaults to false.
§Warning
You should think very carefully before using this method. If invalid hostnames are trusted, any valid certificate for any site will be trusted for use. This introduces significant vulnerabilities, and should only be used as a last resort.
sourcepub fn certs_verification(self, value: bool) -> ConnectorBuilder
pub fn certs_verification(self, value: bool) -> ConnectorBuilder
Controls the use of certificate validation.
Defaults to false.
§Warning
You should think very carefully before using this method. If invalid certificates are trusted, any certificate for any site will be trusted for use. This includes expired certificates. This introduces significant vulnerabilities, and should only be used as a last resort.
sourcepub fn nodelay(self, value: bool) -> ConnectorBuilder
pub fn nodelay(self, value: bool) -> ConnectorBuilder
Set that all sockets have SO_NODELAY set to the supplied value nodelay.
Default is false.
sourcepub fn read_timeout(self, timeout: Option<Duration>) -> ConnectorBuilder
pub fn read_timeout(self, timeout: Option<Duration>) -> ConnectorBuilder
Enables a read timeout.
The timeout applies to each read operation, and resets after a successful read. This is more appropriate for detecting stalled connections when the size isn’t known beforehand.
Default is no timeout.
sourcepub fn write_timeout(self, timeout: Option<Duration>) -> ConnectorBuilder
pub fn write_timeout(self, timeout: Option<Duration>) -> ConnectorBuilder
Enables a write timeout.
The timeout applies to each read operation, and resets after a successful read. This is more appropriate for detecting stalled connections when the size isn’t known beforehand.
Default is no timeout.
sourcepub fn connect_timeout(self, timeout: Option<Duration>) -> ConnectorBuilder
pub fn connect_timeout(self, timeout: Option<Duration>) -> ConnectorBuilder
Set a timeout for only the connect phase of a Client.
Default is None.
§Note
This requires the futures be executed in a tokio runtime with a tokio timer enabled.
Trait Implementations§
source§impl Clone for ConnectorBuilder
impl Clone for ConnectorBuilder
source§fn clone(&self) -> ConnectorBuilder
fn clone(&self) -> ConnectorBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for ConnectorBuilder
impl RefUnwindSafe for ConnectorBuilder
impl Send for ConnectorBuilder
impl Sync for ConnectorBuilder
impl Unpin for ConnectorBuilder
impl UnwindSafe for ConnectorBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)