pub struct ReadResult { /* private fields */ }Expand description
Result type for ReadHalf::read operations.
Implementations§
Source§impl ReadResult
impl ReadResult
Sourcepub fn bytes_read(&self) -> usize
pub fn bytes_read(&self) -> usize
The number of bytes read.
Sourcepub fn fds(&self) -> &[OwnedFd]
pub fn fds(&self) -> &[OwnedFd]
The file descriptors received, if any. This is only available with the std feature.
Sourcepub fn credentials(&self) -> Option<&PassedCredentials>
pub fn credentials(&self) -> Option<&PassedCredentials>
The credentials received, if any. This is only available with the std feature and linux
target.
Sourcepub fn take_fds(&mut self) -> Vec<OwnedFd>
pub fn take_fds(&mut self) -> Vec<OwnedFd>
Takes the file descriptors received, leaving an empty list in their place. This is only
available with the std feature.
Sourcepub fn into_fds(self) -> Vec<OwnedFd>
pub fn into_fds(self) -> Vec<OwnedFd>
Consumes this ReadResult and returns the file descriptors received, if any. This is only
available with the std feature.
Sourcepub fn take_credentials(&mut self) -> Option<PassedCredentials>
pub fn take_credentials(&mut self) -> Option<PassedCredentials>
Takes the credentials received, leaving None in their place. This is only available with
the std feature and linux target.
Sourcepub fn into_credentials(self) -> Option<PassedCredentials>
pub fn into_credentials(self) -> Option<PassedCredentials>
Consumes this ReadResult and returns the credentials received, if any. This is only
available with the std feature and linux target.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReadResult
impl RefUnwindSafe for ReadResult
impl Send for ReadResult
impl Sync for ReadResult
impl Unpin for ReadResult
impl UnsafeUnpin for ReadResult
impl UnwindSafe for ReadResult
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