#[repr(C)]pub struct PollFd {
pub fd: u32,
pub events: PollEvent,
pub revents: PollEvent,
}Expand description
用于 poll 系统调用的文件描述符结构体
MUSL: https://github.com/bminor/musl/blob/c47ad25ea3b484e10326f933e927c0bc8cded3da/include/poll.h#L31
Fields§
§fd: u32文件描述符(File Descriptor),要监视的对象
events: PollEvent期望监听的事件(如可读、可写等),由用户设置
revents: PollEvent实际发生的事件,由内核填写
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PollFd
impl RefUnwindSafe for PollFd
impl Send for PollFd
impl Sync for PollFd
impl Unpin for PollFd
impl UnwindSafe for PollFd
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