[−][src]Struct amq_protocol_tcp::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.
Safety
The inner TcpStream won't be closed on drop and the original one needs to live longer
Methods from Deref<Target = TcpStream>
pub fn is_connected(&self) -> bool
[src]
Check whether the stream is connected or not
pub fn try_connect(&mut self) -> Result<bool, Error>
[src]
Retry the connection. Returns:
- Ok(true) if connected
- Ok(false) if connecting
- Err(_) if an error is encountered
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.
fn deref(&self) -> &Self::Target
[src]
impl DerefMut for TcpStreamWrapper
[src]
Auto Trait Implementations
impl RefUnwindSafe for TcpStreamWrapper
impl Send for TcpStreamWrapper
impl Sync for TcpStreamWrapper
impl Unpin for TcpStreamWrapper
impl UnwindSafe for TcpStreamWrapper
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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.
pub 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>,