Struct fibers_transport::UdpTransporterBuilder [−][src]
pub struct UdpTransporterBuilder<E, D> { /* fields omitted */ }
UdpTransporter
builder.
Methods
impl<E, D> UdpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
[src]
impl<E, D> UdpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
impl<E: Encode, D: Decode> UdpTransporterBuilder<E, D>
[src]
impl<E: Encode, D: Decode> UdpTransporterBuilder<E, D>
pub fn with_codec(encoder: E, decoder: D) -> Self
[src]
pub fn with_codec(encoder: E, decoder: D) -> Self
Makes a new UdpTransporterBuilder
instance 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 size of the send and receive buffer of the resulting instance in byte.
The default value is 4096
.
pub fn finish(self, socket: UdpSocket) -> Result<UdpTransporter<E, D>>
[src]
pub fn finish(self, socket: UdpSocket) -> Result<UdpTransporter<E, D>>
Makes a new UdpTransporter
instance with the given settings.
pub fn bind(
self,
addr: SocketAddr
) -> impl Future<Item = UdpTransporter<E, D>, Error = Error>
[src]
pub fn bind(
self,
addr: SocketAddr
) -> impl Future<Item = UdpTransporter<E, D>, Error = Error>
Starts binding to the specified address and will makes
a new UdpTransporter
instance if the operation is succeeded.
Trait Implementations
impl<E: Debug, D: Debug> Debug for UdpTransporterBuilder<E, D>
[src]
impl<E: Debug, D: Debug> Debug for UdpTransporterBuilder<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: Clone, D: Clone> Clone for UdpTransporterBuilder<E, D>
[src]
impl<E: Clone, D: Clone> Clone for UdpTransporterBuilder<E, D>
fn clone(&self) -> UdpTransporterBuilder<E, D>
[src]
fn clone(&self) -> UdpTransporterBuilder<E, D>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<E, D> Default for UdpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
[src]
impl<E, D> Default for UdpTransporterBuilder<E, D> where
E: Encode + Default,
D: Decode + Default,
Auto Trait Implementations
impl<E, D> Send for UdpTransporterBuilder<E, D> where
D: Send,
E: Send,
impl<E, D> Send for UdpTransporterBuilder<E, D> where
D: Send,
E: Send,
impl<E, D> Sync for UdpTransporterBuilder<E, D> where
D: Sync,
E: Sync,
impl<E, D> Sync for UdpTransporterBuilder<E, D> where
D: Sync,
E: Sync,