pub struct UnixStream { /* private fields */ }Expand description
Owned non-blocking Unix stream descriptor.
Implementations§
Source§impl UnixStream
impl UnixStream
Source§impl UnixStream
impl UnixStream
Sourcepub fn check_connect_error(&self) -> Result<Option<i32>, CoreError>
pub fn check_connect_error(&self) -> Result<Option<i32>, CoreError>
Return the pending SO_ERROR connect status.
Ok(None) means no pending socket error was reported. Ok(Some(code))
returns the raw connect error without making a policy decision.
§Errors
EBADF: The file descriptor is invalid.
Sourcepub fn finish_connect(self) -> Result<Self, CoreError>
pub fn finish_connect(self) -> Result<Self, CoreError>
Finish a non-blocking connect after the socket becomes writable.
Returns the stream when SO_ERROR is clear; otherwise returns the raw
socket error as CoreError.
§Errors
Returns the same errors as Self::check_connect_error, or the
pending connection error itself.
Auto Trait Implementations§
impl Freeze for UnixStream
impl RefUnwindSafe for UnixStream
impl Send for UnixStream
impl Sync for UnixStream
impl Unpin for UnixStream
impl UnsafeUnpin for UnixStream
impl UnwindSafe for UnixStream
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