[][src]Struct amq_protocol_tcp::TcpStreamWrapper

pub struct TcpStreamWrapper(_);

Unsafe wrapper "Cloning" the TcpStream but not closing it on drop.

Implementations

impl TcpStreamWrapper[src]

pub unsafe fn new(socket: &TcpStream) -> Self[src]

Clone the TcpStream. Original one needs to last at least for the same lifetime.

Methods from Deref<Target = TcpStream>

pub fn is_readable(&self) -> Result<(), Error>[src]

Attempt reading from underlying stream, returning Ok(()) if the stream is readable

pub fn is_writable(&self) -> Result<(), Error>[src]

Attempt writing to underlying stream, returning Ok(()) if the stream is writable

Trait Implementations

impl AsRawFd for TcpStreamWrapper[src]

impl Deref for TcpStreamWrapper[src]

type Target = TcpStream

The resulting type after dereferencing.

impl DerefMut for TcpStreamWrapper[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.