pub struct UdpConn<C> {
inner: UdpSocket,
codec: C,
config: UdpConfig,
}
Expand description
UDP network connection implementation of the Connection
trait.
Fields§
§inner: UdpSocket
§codec: C
§config: UdpConfig
Implementations§
Trait Implementations§
Source§impl<C, E> Connection for UdpConn<C>
impl<C, E> Connection for UdpConn<C>
type Message = (<C as Codec>::Message, Endpoint)
type Error = E
Source§fn peer_endpoint(&self) -> Result<Endpoint, Self::Error>
fn peer_endpoint(&self) -> Result<Endpoint, Self::Error>
Returns the remote peer endpoint of this connection
Source§fn local_endpoint(&self) -> Result<Endpoint, Self::Error>
fn local_endpoint(&self) -> Result<Endpoint, Self::Error>
Returns the local socket endpoint of this connection
Auto Trait Implementations§
impl<C> Freeze for UdpConn<C>where
C: Freeze,
impl<C> RefUnwindSafe for UdpConn<C>where
C: RefUnwindSafe,
impl<C> Send for UdpConn<C>where
C: Send,
impl<C> Sync for UdpConn<C>where
C: Sync,
impl<C> Unpin for UdpConn<C>where
C: Unpin,
impl<C> UnwindSafe for UdpConn<C>where
C: UnwindSafe,
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
Mutably borrows from an owned value. Read more