boost::redis::any_adapter

A type‐erased reference to a response.

Synopsis

class any_adapter;

Enums

Name

Description

parse_event

Parse events that an adapter must support.

Member Functions

Name

Description

any_adapter [constructor]

Constructors

on_init

Calls the implementation with the arguments `impl`(parse_event::init, ...);

on_done

Calls the implementation with the arguments `impl`(parse_event::done, ...);

on_node

Calls the implementation with the arguments `impl`(parse_event::node, ...);

Description

A type‐erased response adapter. It can be executed using connection::async_exec. Using this type instead of raw response references enables separate compilation.

Given a response object resp that can be passed to async_exec, the following two statements have the same effect:

co_await conn.async_exec(req, resp);
co_await conn.async_exec(req, any_response(resp));

Created with MrDocs