pub struct SendableSocket<S>(pub S);
Expand description
Wraps normal sockets types (e.g. std::net::TcpStream
) so they may be transmitted to
other processes.
§Windows
Windows file/pipe handles or sockets that have been associated with an IOCP cannot be
sent to other processes. Tokio is backed by an IOCP on Windows, so Tokio sockets may
not be sent. Do note however that Tokio sockets allow you to accept
standard blocking
sockets, which will be elligible for transmission to other processes, where they can
be added to a Tokio event loop.
Tuple Fields§
§0: S
Trait Implementations§
Source§impl<S: Debug> Debug for SendableSocket<S>
impl<S: Debug> Debug for SendableSocket<S>
Source§impl<'de, B> Deserialize<'de> for SendableSocket<B>where
B: FromRawFd,
impl<'de, B> Deserialize<'de> for SendableSocket<B>where
B: FromRawFd,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<S> Freeze for SendableSocket<S>where
S: Freeze,
impl<S> RefUnwindSafe for SendableSocket<S>where
S: RefUnwindSafe,
impl<S> Send for SendableSocket<S>where
S: Send,
impl<S> Sync for SendableSocket<S>where
S: Sync,
impl<S> Unpin for SendableSocket<S>where
S: Unpin,
impl<S> UnwindSafe for SendableSocket<S>where
S: 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