[][src]Struct brokaw::ConnectionConfig

pub struct ConnectionConfig { /* fields omitted */ }

A builder for NntpConnection

Implementations

impl ConnectionConfig[src]

pub fn new() -> ConnectionConfig[src]

Create a new connection builder

pub fn compression(&mut self, compression: Option<Compression>) -> &mut Self[src]

Set the compression type on the connection

pub fn tls_config(&mut self, config: Option<TlsConfig>) -> &mut Self[src]

Configure TLS on the connection

pub fn default_tls(&mut self, domain: impl AsRef<str>) -> Result<&mut Self>[src]

Use the default TLS implementation

pub fn read_timeout(&mut self, dur: Option<Duration>) -> &mut Self[src]

Set the read timeout on the socket

pub fn first_line_buf_size(&mut self, s: usize) -> &mut Self[src]

Set the size of the buffer used to read the first line

pub fn data_blocks_buf_size(&mut self, s: usize) -> &mut Self[src]

Set the size of the buffer used to read data blocks

pub fn connect(
    &self,
    addr: impl ToSocketAddrs
) -> Result<(NntpConnection, RawResponse)>
[src]

Create a connection from the config

Trait Implementations

impl Clone for ConnectionConfig[src]

impl Debug for ConnectionConfig[src]

impl Default for ConnectionConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.