#[repr(transparent)]pub struct FdSet(_);
Implementations
sourceimpl 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)
sourcepub fn fds(&mut self, highest: Option<RawFd>) -> Fds<'_>ⓘNotable traits for Fds<'a>impl<'a> Iterator for Fds<'a> type Item = RawFd;
pub fn fds(&mut 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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