pub struct InboundWire<V, D>{ /* private fields */ }Expand description
Wire for inbound communication
Implementations§
Source§impl<V, D> InboundWire<V, D>
impl<V, D> InboundWire<V, D>
pub fn new( transmission_size: usize, packet_ttl: Duration, verifier: V, decrypter: D, ) -> Self
pub fn transmission_size(&self) -> usize
pub fn with_tcp_stream( self, stream: ReadHalf<TcpStream>, remote_addr: SocketAddr, ) -> TcpStreamInboundWire<V, D>
pub fn with_udp_socket(self, socket: RecvHalf) -> UdpSocketInboundWire<V, D>
pub fn process( &mut self, buf: &[u8], ) -> Result<Option<Vec<u8>>, InboundWireError>
Trait Implementations§
Source§impl<V, D> Clone for InboundWire<V, D>
impl<V, D> Clone for InboundWire<V, D>
Source§fn clone(&self) -> InboundWire<V, D>
fn clone(&self) -> InboundWire<V, D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<V, D> Freeze for InboundWire<V, D>
impl<V, D> RefUnwindSafe for InboundWire<V, D>where
V: RefUnwindSafe,
D: RefUnwindSafe,
impl<V, D> Send for InboundWire<V, D>
impl<V, D> Sync for InboundWire<V, D>
impl<V, D> Unpin for InboundWire<V, D>
impl<V, D> UnsafeUnpin for InboundWire<V, D>where
V: UnsafeUnpin,
D: UnsafeUnpin,
impl<V, D> UnwindSafe for InboundWire<V, D>where
V: UnwindSafe,
D: 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