[−][src]Struct fibers_transport::TcpTransporterBuilder
TcpTransporter
builder.
Implementations
impl<E, D> TcpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
[src]
E: Encode + Default,
D: Decode + Default,
impl<E: Encode, D: Decode> TcpTransporterBuilder<E, D>
[src]
pub fn with_codec(encoder: E, decoder: D) -> Self
[src]
Makes a new TcpTransporterBuilder
with the given encoder and decoder.
pub fn buf_size(self, size: usize) -> Self
[src]
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]
Builds a TcpTransporterBuilder
instance from the given TcpStream
.
pub fn connect(
self,
peer: SocketAddr
) -> impl Future<Item = TcpTransporter<E, D>, Error = Error>
[src]
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, D> Default for TcpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
[src]
E: Encode + Default,
D: Decode + Default,
Auto Trait Implementations
impl<E, D> RefUnwindSafe for TcpTransporterBuilder<E, D> where
D: RefUnwindSafe,
E: RefUnwindSafe,
D: RefUnwindSafe,
E: RefUnwindSafe,
impl<E, D> Send for TcpTransporterBuilder<E, D> where
D: Send,
E: Send,
D: Send,
E: Send,
impl<E, D> Sync for TcpTransporterBuilder<E, D> where
D: Sync,
E: Sync,
D: Sync,
E: Sync,
impl<E, D> Unpin for TcpTransporterBuilder<E, D> where
D: Unpin,
E: Unpin,
D: Unpin,
E: Unpin,
impl<E, D> UnwindSafe for TcpTransporterBuilder<E, D> where
D: UnwindSafe,
E: UnwindSafe,
D: UnwindSafe,
E: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,