pub struct LocalSocketStream { /* private fields */ }
👎Deprecated: does not integrate with async runtimes, leading to poor performance and bugs related to reading and writing at the same time (you can’t) – see the
tokio
modules for relevant IPC primitives or open an issue if you want more async runtimes to be supported as wellAvailable on crate feature
nonblocking
only.Expand description
An asynchronous local socket byte stream, obtained eiter from LocalSocketListener
or by connecting to an existing local socket.
Implementations§
Source§impl LocalSocketStream
impl LocalSocketStream
Sourcepub async fn connect<'a>(
name: impl ToLocalSocketName<'a> + Send + 'static,
) -> Result<Self>
👎Deprecated: does not integrate with async runtimes, leading to poor performance and bugs related to reading and writing at the same time (you can’t) – see the tokio
modules for relevant IPC primitives or open an issue if you want more async runtimes to be supported as well
pub async fn connect<'a>( name: impl ToLocalSocketName<'a> + Send + 'static, ) -> Result<Self>
tokio
modules for relevant IPC primitives or open an issue if you want more async runtimes to be supported as wellConnects to a remote local socket server.
Trait Implementations§
Source§impl AsyncRead for LocalSocketStream
impl AsyncRead for LocalSocketStream
Source§impl AsyncWrite for LocalSocketStream
impl AsyncWrite for LocalSocketStream
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf
into the object. Read moreSource§fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more
Auto Trait Implementations§
impl Freeze for LocalSocketStream
impl !RefUnwindSafe for LocalSocketStream
impl Send for LocalSocketStream
impl Sync for LocalSocketStream
impl Unpin for LocalSocketStream
impl !UnwindSafe for LocalSocketStream
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