Struct tokio_eventfd::EventFd[][src]

pub struct EventFd(_);

Implementations

impl EventFd[src]

pub fn new(init: u32, is_semaphore: bool) -> Result<Self>[src]

Create new Eventfd. init is the initial value of the counter is_semaphore determines eventfd behaviour:

  • if true and counter has non-zero value read returns 8 bytes containing the value 1, and the counter’s value is decremented by 1
  • if false and counter has non-zero value read returns the value and the counter’s value is reset to 0.

pub fn try_clone(&self) -> Result<Self>[src]

Trait Implementations

impl AsRawFd for EventFd[src]

impl AsyncRead for EventFd[src]

impl AsyncWrite for EventFd[src]

impl FromRawFd for EventFd[src]

Auto Trait Implementations

impl !RefUnwindSafe for EventFd

impl Send for EventFd

impl Sync for EventFd

impl Unpin for EventFd

impl !UnwindSafe for EventFd

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.