Seastar
High performance C++ framework for concurrent servers
Public Types | Static Public Member Functions | List of all members
seastar::futurize< T > Struct Template Reference

Detailed Description

template<typename T>
struct seastar::futurize< T >

Converts a type to a future type, if it isn't already.

Returns
Result in member type 'type'.

#include <future.hh>

Public Types

using type = future< T >
 If T is a future, T; otherwise future<T>
 
using promise_type = promise< T >
 The promise type associated with type.
 
using value_type = std::tuple< T >
 The value tuple type associated with type.
 

Static Public Member Functions

template<typename Func , typename... FuncArgs>
static type apply (Func &&func, std::tuple< FuncArgs... > &&args) noexcept
 
template<typename Func , typename... FuncArgs>
static type apply (Func &&func, FuncArgs &&... args) noexcept
 
static type convert (T &&value)
 Convert a value or a future to a future.
 
static type convert (type &&value)
 
static type from_tuple (value_type &&value)
 Convert the tuple representation into a future.
 
static type from_tuple (const value_type &value)
 Convert the tuple representation into a future.
 
template<typename Arg >
static type make_exception_future (Arg &&arg)
 Makes an exceptional future of type type.
 

Member Function Documentation

◆ apply() [1/2]

template<typename T>
template<typename Func , typename... FuncArgs>
static type seastar::futurize< T >::apply ( Func &&  func,
std::tuple< FuncArgs... > &&  args 
)
inlinestaticnoexcept

Apply a function to an argument list (expressed as a tuple) and return the result, as a future (if it wasn't already).

◆ apply() [2/2]

template<typename T>
template<typename Func , typename... FuncArgs>
static type seastar::futurize< T >::apply ( Func &&  func,
FuncArgs &&...  args 
)
inlinestaticnoexcept

Apply a function to an argument list and return the result, as a future (if it wasn't already).


The documentation for this struct was generated from the following file: