#[repr(u8)]pub enum EpollCtl {
ADD = 1,
DEL = 2,
MOD = 3,
}
Expand description
epoll_ctl
操作类型,用于管理 epoll 实例中的监听目标(fd)。
Variants§
ADD = 1
添加一个新的监听目标到 epoll 实例中(epoll_ctl(epfd, EPOLL_CTL_ADD, fd, event))
DEL = 2
从 epoll 实例中删除一个监听目标(epoll_ctl(epfd, EPOLL_CTL_DEL, fd, NULL))
MOD = 3
修改已添加目标的监听事件(epoll_ctl(epfd, EPOLL_CTL_MOD, fd, event))
Trait Implementations§
Source§impl TryFrom<u8> for EpollCtl
impl TryFrom<u8> for EpollCtl
Source§type Error = TryFromPrimitiveError<EpollCtl>
type Error = TryFromPrimitiveError<EpollCtl>
The type returned in the event of a conversion error.
Source§fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.