pub struct LocalSocketStream { /* private fields */ }
Available on crate feature
tokio_support
only.Expand description
A Tokio-based local socket byte stream, obtained eiter from LocalSocketListener
or by connecting to an existing local socket.
§Examples
Implementations§
Source§impl LocalSocketStream
impl LocalSocketStream
Sourcepub async fn connect<'a>(name: impl ToLocalSocketName<'a>) -> Result<Self>
pub async fn connect<'a>(name: impl ToLocalSocketName<'a>) -> Result<Self>
Connects to a remote local socket server.
Sourcepub fn into_split(self) -> (OwnedReadHalf, OwnedWriteHalf)
pub fn into_split(self) -> (OwnedReadHalf, OwnedWriteHalf)
Splits a stream into a read half and a write half, which can be used to read and write the stream concurrently.
Trait Implementations§
Source§impl AsRawFd for LocalSocketStream
impl AsRawFd for LocalSocketStream
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>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
Attempt to write bytes from
buf
into the object. Read moreSource§fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize>>
fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>>
Attempt to write bytes from
bufs
into the object using vectored
IO operations. Read moreAuto 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