pub struct UnixStream<'sel, const FDS: usize> { /* private fields */ }Expand description
A Unix stream.
Implementations§
Source§impl<'sel, const FDS: usize> UnixStream<'sel, FDS>
impl<'sel, const FDS: usize> UnixStream<'sel, FDS>
Sourcepub async fn connect<E: 'static, const EVENTS: usize, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize>(
ctx: &Context<'sel, E, EVENTS, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>,
addr: &SocketAddrUnix,
) -> Result<Self, NetError>
pub async fn connect<E: 'static, const EVENTS: usize, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize>( ctx: &Context<'sel, E, EVENTS, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>, addr: &SocketAddrUnix, ) -> Result<Self, NetError>
Sourcepub fn shutdown(&self, how: Shutdown) -> Result<()>
pub fn shutdown(&self, how: Shutdown) -> Result<()>
Shuts down the connection (which also impacts potentially existing read/write halves).
The underlying file descriptor stays open until this value is dropped.
§Errors
Returns an error if a syscall fails.
Sourcepub fn local_addr(&self) -> Result<SocketAddrUnix>
pub fn local_addr(&self) -> Result<SocketAddrUnix>
Sourcepub fn peer_addr(&self) -> Result<SocketAddrUnix>
pub fn peer_addr(&self) -> Result<SocketAddrUnix>
Sourcepub const fn split(
&mut self,
) -> (BorrowedReadHalf<'_, 'sel, FDS>, BorrowedWriteHalf<'_, 'sel, FDS>)
pub const fn split( &mut self, ) -> (BorrowedReadHalf<'_, 'sel, FDS>, BorrowedWriteHalf<'_, 'sel, FDS>)
Splits the UnixStream into two halves: reader and writer.
Trait Implementations§
Source§impl<const FDS: usize> AsyncRead for UnixStream<'_, FDS>
impl<const FDS: usize> AsyncRead for UnixStream<'_, FDS>
Auto Trait Implementations§
impl<'sel, const FDS: usize> !RefUnwindSafe for UnixStream<'sel, FDS>
impl<'sel, const FDS: usize> !Send for UnixStream<'sel, FDS>
impl<'sel, const FDS: usize> !Sync for UnixStream<'sel, FDS>
impl<'sel, const FDS: usize> !UnwindSafe for UnixStream<'sel, FDS>
impl<'sel, const FDS: usize> Forget for UnixStream<'sel, FDS>
impl<'sel, const FDS: usize> Freeze for UnixStream<'sel, FDS>where
Socket<'sel, FDS>: Freeze,
impl<'sel, const FDS: usize> Move for UnixStream<'sel, FDS>
impl<'sel, const FDS: usize> Unpin for UnixStream<'sel, FDS>where
Socket<'sel, FDS>: Unpin,
impl<'sel, const FDS: usize> UnsafeUnpin for UnixStream<'sel, FDS>where
Socket<'sel, FDS>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> AsyncReadExt for T
impl<T> AsyncReadExt for T
Source§fn read_exact<'a>(
&'a mut self,
buf: &'a mut [u8],
) -> impl Future<Output = Result<(), ReadExactError<Self::Error>>>
fn read_exact<'a>( &'a mut self, buf: &'a mut [u8], ) -> impl Future<Output = Result<(), ReadExactError<Self::Error>>>
Fills the whole given buffer, calling
AsyncRead::read until it’s done. Read moreSource§impl<T> AsyncWriteExt for Twhere
T: AsyncWrite + ?Sized,
impl<T> AsyncWriteExt for Twhere
T: AsyncWrite + ?Sized,
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