Struct base::sys::unix::event::PlatformEvent

source ·
pub(crate) struct PlatformEvent {
    event_handle: SafeDescriptor,
}
Expand description

A safe wrapper around a Linux eventfd (man 2 eventfd).

An eventfd is useful because it is sendable across processes and can be used for signaling in and out of the KVM API. They can also be polled like any other file descriptor.

Fields§

§event_handle: SafeDescriptor

Implementations§

Creates a new blocking eventfd with an initial value of 0.

See EventExt::write_count.

See EventExt::read_count.

See Event::signal.

See Event::wait.

See Event::wait_timeout.

See Event::reset.

Clones this eventfd, internally creating a new file descriptor. The new eventfd will share the same underlying count within the kernel.

Trait Implementations§

Returns the underlying raw descriptor. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Safety Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Returns the underlying raw descriptors. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

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.