| Home | Libraries | People | FAQ | More

#### saved_handler

An invocable, nullary function object which holds a completion handler.

##### Synopsis

Defined in header `<boost/beast/core/saved_handler.hpp>`

    class saved_handler

##### Member Functions

Name | Description
--- | ---
emplace | Store a completion handler in the container.
has_value | Returns `true` if `*this` contains a completion handler.
invoke | Unconditionally invoke the stored completion handler.
maybe_invoke | Conditionally invoke the stored completion handler.
operator= | Copy Assignment (deleted) — Move Assignment.
reset | Discard the saved handler, if one exists.
saved_handler [constructor] | Default Constructor. — Copy Constructor (deleted) — Move Constructor.
~saved_handler [destructor] | Destructor.

##### Description

This container can hold a type-erased instance of any completion handler, or it can be empty. When the container holds a value, the implementation maintains an instance of `net::executor_work_guard` for the handler's associated executor. Memory is dynamically allocated to store the completion handler, and the allocator may optionally be specified. Otherwise, the implementation uses the handler's associated allocator.