Struct FileDesc

pub struct FileDesc(pub(in ::sys::fd::unix) OwnedFd);

Fields

0: OwnedFd

Implementations

impl FileDesc

fn try_clone(&self) -> Result<Self>
fn read(&self, buf: &mut [u8]) -> Result<usize>
fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
fn is_read_vectored(&self) -> bool
fn read_to_end(&self, buf: &mut Vec<u8>) -> Result<usize>
fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>
fn read_buf(&self, cursor: BorrowedCursor<'_, u8>) -> Result<()>
fn read_buf_at(&self, cursor: BorrowedCursor<'_, u8>, offset: u64) -> Result<()>
fn read_vectored_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> Result<usize>
fn write(&self, buf: &[u8]) -> Result<usize>
fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> Result<usize>
fn is_write_vectored(&self) -> bool
fn write_at(&self, buf: &[u8], offset: u64) -> Result<usize>
fn write_vectored_at(&self, bufs: &[IoSlice<'_>], offset: u64) -> Result<usize>
fn set_cloexec(&self) -> Result<()>
fn set_nonblocking(&self, nonblocking: bool) -> Result<()>
fn duplicate(&self) -> Result<FileDesc>

Trait Implementations

impl AsFd for FileDesc

fn as_fd(&self) -> BorrowedFd<'_>

impl AsInner<OwnedFd> for FileDesc

fn as_inner(&self) -> &OwnedFd

impl AsRawFd for FileDesc

fn as_raw_fd(&self) -> RawFd

impl Debug for FileDesc

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl FromInner<OwnedFd> for FileDesc

fn from_inner(owned_fd: OwnedFd) -> Self

impl FromRawFd for FileDesc

unsafe fn from_raw_fd(raw_fd: RawFd) -> Self

impl IntoInner<OwnedFd> for FileDesc

fn into_inner(self) -> OwnedFd

impl IntoRawFd for FileDesc

fn into_raw_fd(self) -> RawFd

Auto Trait Implementations

impl Freeze for FileDesc

impl RefUnwindSafe for FileDesc

impl Send for FileDesc

impl Sync for FileDesc

impl Unpin for FileDesc

impl UnsafeUnpin for FileDesc

impl UnwindSafe for FileDesc

Blanket Implementations

impl<T> Any for FileDesc where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for FileDesc where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for FileDesc where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for FileDesc

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for FileDesc where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for FileDesc

impl<T, U> Into<U> for FileDesc where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for FileDesc where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for FileDesc where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>