Struct FdSet
nix::sys::select
#[repr(C)] pub struct FdSet(_);
impl FdSet
pub fn new() -> FdSet
pub fn insert(&mut self, fd: RawFd)
pub fn remove(&mut self, fd: RawFd)
pub fn contains(&mut self, fd: RawFd) -> bool
pub fn clear(&mut self)
pub fn highest(&mut self) -> Option<RawFd>
Finds the highest file descriptor in the set.
Returns None if the set is empty.
None
This can be used to calculate the nfds parameter of the select function.
nfds
select
let mut set = FdSet::new(); set.insert(4); set.insert(9); assert_eq!(set.highest(), Some(9));