pub struct UnixStreamFd {
pub fd: Fd,
}Expand description
Owned non-blocking Unix stream descriptor.
Fields§
§fd: FdUnderlying descriptor for reactor registration and raw byte helpers.
Implementations§
Source§impl UnixStreamFd
impl UnixStreamFd
Sourcepub fn peer_cred(&self) -> Result<Option<PeerCred>, CoreError>
pub fn peer_cred(&self) -> Result<Option<PeerCred>, CoreError>
Return peer credentials when the platform supports SO_PEERCRED.
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.
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.
Auto Trait Implementations§
impl Freeze for UnixStreamFd
impl RefUnwindSafe for UnixStreamFd
impl Send for UnixStreamFd
impl Sync for UnixStreamFd
impl Unpin for UnixStreamFd
impl UnsafeUnpin for UnixStreamFd
impl UnwindSafe for UnixStreamFd
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