Struct rustix::io::epoll::Epoll [−][src]
pub struct Epoll<Context: Context> { /* fields omitted */ }
Expand description
An “epoll”, an interface to an OS object allowing one to repeatedly wait for events from a set of file descriptors efficiently.
Implementations
epoll_create1(flags)
—Creates a new Epoll
.
Use the CreateFlags::CLOEXEC
flag to prevent the resulting file
descriptor from being implicitly passed across exec
boundaries.
epoll_ctl(self, EPOLL_CTL_ADD, data, event)
—Adds an element to an
Epoll
.
This registers interest in any of the events set in events
occurring
on the file descriptor associated with data
.
epoll_ctl(self, EPOLL_CTL_MOD, target, event)
—Modifies an element in
this Epoll
.
This sets the events of interest with target
to events
.
epoll_ctl(self, EPOLL_CTL_DEL, target, NULL)
—Removes an element in
this Epoll
.
This also returns the owning Data
.
epoll_wait(self, events, timeout)
—Waits for registered events of
interest.
For each event of interest, an element is written to events
. On
success, this returns the number of written elements.
Trait Implementations
Borrows the file descriptor. Read more
Constructs a new instance of Self
from the given raw file
descriptor. Read more
Auto Trait Implementations
impl<Context> RefUnwindSafe for Epoll<Context> where
Context: RefUnwindSafe,
impl<Context> UnwindSafe for Epoll<Context> where
Context: UnwindSafe,
Blanket Implementations
Borrows the reference. Read more
pub fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromFilelike + IntoFilelike,
pub fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromFilelike + IntoFilelike,
Return a borrowing view of a resource which dereferences to a &Target
or &mut Target
. Read more
Returns the raw value.
Returns the raw value.
Borrows the reference.
pub fn as_socketlike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromSocketlike + IntoSocketlike,
pub fn as_socketlike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromSocketlike + IntoSocketlike,
Return a borrowing view of a resource which dereferences to a &Target
or &mut Target
. Read more
Mutably borrows from an owned value. Read more
Constructs Self
from the raw value.
Constructs Self
from the raw value.
Returns the raw value.