[][src]Struct tokio_net::signal::CtrlC

#[must_use = "streams do nothing unless polled"]
pub struct CtrlC { /* fields omitted */ }

Represents a stream which receives "ctrl-c" notifications sent to the process.

In general signals are handled very differently across Unix and Windows, but this is somewhat cross platform in terms of how it can be handled. A ctrl-c event to a console process can be represented as a stream for both Windows and Unix.

Note that there are a number of caveats listening for signals, and you may wish to read up on the documentation in the unix or windows module to take a peek.

Notably, a notification to this process notifies all streams listening to this event. Moreover, the notifications 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.

Trait Implementations

impl Debug for CtrlC[src]

impl Stream for CtrlC[src]

type Item = ()

Values yielded by the stream.

Auto Trait Implementations

impl Send for CtrlC

impl Sync for CtrlC

impl Unpin for CtrlC

impl !UnwindSafe for CtrlC

impl !RefUnwindSafe for CtrlC

Blanket Implementations

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.

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

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

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

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]