Struct fibers_transport::TcpTransporterBuilder [−][src]
pub struct TcpTransporterBuilder<E, D> { /* fields omitted */ }
TcpTransporter
builder.
Methods
impl<E, D> TcpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
[src]
impl<E, D> TcpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
impl<E: Encode, D: Decode> TcpTransporterBuilder<E, D>
[src]
impl<E: Encode, D: Decode> TcpTransporterBuilder<E, D>
pub fn with_codec(encoder: E, decoder: D) -> Self
[src]
pub fn with_codec(encoder: E, decoder: D) -> Self
Makes a new TcpTransporterBuilder
with the given encoder and decoder.
pub fn buf_size(self, size: usize) -> Self
[src]
pub fn buf_size(self, size: usize) -> Self
Sets the application level read/write buffer size of the resulting instance in byte.
The default value is 8192
.
pub fn finish(self, stream: TcpStream) -> Result<TcpTransporter<E, D>>
[src]
pub fn finish(self, stream: TcpStream) -> Result<TcpTransporter<E, D>>
Builds a TcpTransporterBuilder
instance from the given TcpStream
.
pub fn connect(
self,
peer: SocketAddr
) -> impl Future<Item = TcpTransporter<E, D>, Error = Error>
[src]
pub fn connect(
self,
peer: SocketAddr
) -> impl Future<Item = TcpTransporter<E, D>, Error = Error>
Builds a TcpTransporterBuilder
instance by connecting to the specified peer.
Trait Implementations
impl<E: Debug, D: Debug> Debug for TcpTransporterBuilder<E, D>
[src]
impl<E: Debug, D: Debug> Debug for TcpTransporterBuilder<E, D>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<E, D> Default for TcpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
[src]
impl<E, D> Default for TcpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
Auto Trait Implementations
impl<E, D> Send for TcpTransporterBuilder<E, D> where
D: Send,
E: Send,
impl<E, D> Send for TcpTransporterBuilder<E, D> where
D: Send,
E: Send,
impl<E, D> Sync for TcpTransporterBuilder<E, D> where
D: Sync,
E: Sync,
impl<E, D> Sync for TcpTransporterBuilder<E, D> where
D: Sync,
E: Sync,