Struct nix::sys::select::FdSet
#[repr(transparent)]
pub struct FdSet(_);
Documentation
Contains a set of file descriptors used by select
Implementations
impl FdSet
pub fn clear(&mut Self)
Remove all file descriptors from this FdSet
.
pub fn fds(&Self, highest: Option<RawFd>) -> Fds<'_>
Returns an iterator over the file descriptors in the set.
For performance, it takes an optional higher bound: the iterator will not return any elements of the set greater than the given file descriptor.
Examples
let mut set = FdSet::new();
set.insert(4);
set.insert(9);
let fds: Vec<RawFd> = set.fds(None).collect();
assert_eq!(fds, vec![4, 9]);
Trait Implementations
impl Debug for FdSet
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Hash for FdSet
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl StructuralEq for FdSet
impl StructuralPartialEq for FdSet
Auto Trait Implementations
impl RefUnwindSafe for FdSet
impl UnwindSafe for FdSet
Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T