[][src]Struct tokio_signal::windows::Event

pub struct Event { /* fields omitted */ }

Stream of events discovered via SetConsoleCtrlHandler.

This structure can be used to listen for events of the type CTRL_C_EVENT and CTRL_BREAK_EVENT. The Stream trait is implemented for this struct and will resolve for each notification received by the process. Note that there are few limitations with this as well:

  • A notification to this process notifies all Event streams for that event type.
  • Notifications to an Event stream are coalesced if they aren't processed quickly enough. This means that if two notifications are received back-to-back, then the stream may only receive one item about the two notifications.

Methods

impl Event[src]

pub fn ctrl_c() -> IoFuture<Event>[src]

Creates a new stream listening for the CTRL_C_EVENT events.

This function will register a handler via SetConsoleCtrlHandler and deliver notifications to the returned stream.

pub fn ctrl_c_handle(handle: &Handle) -> IoFuture<Event>[src]

Creates a new stream listening for the CTRL_C_EVENT events.

This function will register a handler via SetConsoleCtrlHandler and deliver notifications to the returned stream.

pub fn ctrl_break() -> IoFuture<Event>[src]

Creates a new stream listening for the CTRL_BREAK_EVENT events.

This function will register a handler via SetConsoleCtrlHandler and deliver notifications to the returned stream.

pub fn ctrl_break_handle(handle: &Handle) -> IoFuture<Event>[src]

Creates a new stream listening for the CTRL_BREAK_EVENT events.

This function will register a handler via SetConsoleCtrlHandler and deliver notifications to the returned stream.

Trait Implementations

impl Stream for Event[src]

type Item = ()

The type of item this stream will yield on success.

type Error = Error

The type of error this stream may generate.

Auto Trait Implementations

impl !RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl !UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?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.