[go: up one dir, main page]

pub struct TimerFd(_);
Expand description

Represents a timerfd.

See also timerfd_create(2).

Implementations

Creates a new TimerFd.

By default, it uses the monotonic clock, is blocking and does not close on exec. The parameters allow you to change that.

Errors

On Linux 2.6.26 and earlier, nonblocking and cloexec are not supported and setting them will return an error of kind ErrorKind::InvalidInput.

This can also fail in various cases of resource exhaustion. Please check timerfd_create(2) for details.

Creates a new TimerFd with default settings.

Use new_custom to specify custom settings.

Sets this timerfd to a given TimerState and returns the old state.

Returns the current TimerState.

Read from this timerfd.

Returns the number of timer expirations since the last read. If this timerfd is operating in blocking mode (the default), it will not return zero but instead block until the timer has expired at least once.

Trait Implementations

Extracts the raw file descriptor. Read more

Constructs a new instance of Self from the given raw file descriptor. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Returns the raw value.

Returns the raw value.

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.

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.