Struct routing::Evented [] [src]

#[must_use]
pub struct Evented<T, Ev = Event> where Ev: Debug { /* fields omitted */ }

An Evented wraps a T and bundles some events alongside it.

The public methods on Evented are such that it is difficult to drop the events contained.

Methods

impl<Ev: Debug> Evented<(), Ev>
[src]

Construct a valueless Evented struct for storing events.

Add a value to a valueless Evented struct.

impl<T, Ev: Debug> Evented<T, Ev>
[src]

Construct a new Evented from some events and a value.

Construct a new Evented from a single event and a value.

Apply a function to the value contained within an Evented.

Apply a function producing another Evented, and combine the events from both.

Combine the events of this Evented with the events and value of another.

Add a single event.

Add multiple events.

Extract the value from this Evented, but ONLY whilst transferring the events to another Evented value.

Extract the events to an event buffer.

Consume the Evented and yield just its events.

This is one of two methods that allows us to drop events (the other is extract_to_buf).

Trait Implementations

impl<T, Ev: Debug> Drop for Evented<T, Ev>
[src]

Explode if an attempt is made to drop events.

A method called when the value goes out of scope. Read more