pub struct FdSet(/* private fields */);
Expand description
Contains a set of file descriptors used by select
Implementations§
Source§impl 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<'_> ⓘ
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 Copy for FdSet
impl Eq for FdSet
impl StructuralPartialEq for FdSet
Auto Trait Implementations§
impl Freeze for FdSet
impl RefUnwindSafe for FdSet
impl Send for FdSet
impl Sync for FdSet
impl Unpin for FdSet
impl UnwindSafe for FdSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)