pub struct Fd<T: AsRawFd> { /* private fields */ }Expand description
A file descriptor of interest.
Can wrap anything which implements AsRawFd.
Implementations§
Source§impl<T: AsRawFd> Fd<T>
impl<T: AsRawFd> Fd<T>
pub fn new(inner: T, events: EpollFlags) -> Result<Self, Error>
pub fn poll_with_mut<Output, F: FnMut(&mut T, EpollFlags) -> Result<Output, Error>>( &mut self, cx: &Context<'_>, func: F, ) -> Poll<Result<Output, Error>>
pub const fn with_mut<Output, F: FnMut(&mut T, EpollFlags) -> Result<Output, Error>>( &mut self, func: F, ) -> FdWithMutFuture<'_, T, Output, F>
pub fn poll_with<Output, F: FnMut(&T, EpollFlags) -> Result<Output, Error>>( &self, cx: &Context<'_>, func: F, ) -> Poll<Result<Output, Error>>
pub const fn with<Output, F: FnMut(&T, EpollFlags) -> Result<Output, Error>>( &self, func: F, ) -> FdWithFuture<'_, T, Output, F>
pub const fn inner(&self) -> &T
pub const fn inner_mut(&mut self) -> &mut T
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Fd<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Fd<T>
impl<T> !Send for Fd<T>
impl<T> !Sync for Fd<T>
impl<T> Unpin for Fd<T>where
T: Unpin,
impl<T> UnsafeUnpin for Fd<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Fd<T>where
T: UnwindSafe,
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