#[repr(transparent)]pub struct FdSet(_);
Expand description
Contains a set of file descriptors used by select
Implementations
sourceimpl FdSet
impl FdSet
sourcepub fn contains(&self, fd: RawFd) -> bool
pub fn contains(&self, fd: RawFd) -> bool
Test an FdSet
for the presence of a certain file descriptor.
sourcepub fn fds(&self, highest: Option<RawFd>) -> Fds<'_>ⓘNotable traits for Fds<'a>impl<'a> Iterator for Fds<'a> type Item = RawFd;
pub fn fds(&self, highest: Option<RawFd>) -> Fds<'_>ⓘNotable traits for Fds<'a>impl<'a> Iterator for Fds<'a> type Item = RawFd;
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 Copy for FdSet
impl Eq for FdSet
impl StructuralEq for FdSet
impl StructuralPartialEq for FdSet
Auto Trait Implementations
impl RefUnwindSafe for FdSet
impl Send for FdSet
impl Sync for FdSet
impl Unpin for FdSet
impl UnwindSafe for FdSet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more