Struct rustix::io::epoll::Epoll

source ·
pub struct Epoll<Context: Context> { /* private fields */ }
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
Extracts the raw file descriptor. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Constructs a new instance of Self from the given raw file descriptor. Read more
Consumes this object, returning the raw underlying file descriptor. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Borrows the reference. Read more
Return a borrowing view of a resource which dereferences to a &Target. Read more
Returns the raw value.
Returns the raw value.
Borrows the reference.
Return a borrowing view of a resource which dereferences to a &Target. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Constructs Self from the raw value. Read more
Constructs Self from the raw value. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns the raw value.
Returns the raw value.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.