libzypp 17.37.10

zyppng::MaybeAsyncMixin< isAsync > Struct Template Reference

`#include <zypp/ng/workflows/logichelpers.h>`

Inheritance diagram for zyppng::MaybeAsyncMixin< isAsync >:

## Public Types
template<class Type>
using | MaybeAsyncRef = std::conditional_t< isAsync, AsyncOpRef<Type>, Type>

## Static Public Attributes
static constexpr bool | is_async = isAsync

## Protected Member Functions
template<typename T>
auto | makeReadyResult (T &&res)

## Detailed Description

template<bool isAsync>
struct zyppng::MaybeAsyncMixin< isAsync >

Helper Mixin for types that need to return async results if they are compiled in a async context.

Definition at line 35 of file logichelpers.h.

## Member Typedef Documentation

## ◆ MaybeAsyncRef

template<bool isAsync>
template<class Type>

using zyppng::MaybeAsyncMixin< isAsync >::MaybeAsyncRef = std::conditional_t< isAsync, AsyncOpRef<Type>, Type>

Evaluates to either AsyncOpRef<Type> or Type ,based on the isAsync template param.

Definition at line 44 of file logichelpers.h.

## Member Function Documentation

## ◆ makeReadyResult()

template<bool isAsync>
template<typename T>

auto zyppng::MaybeAsyncMixin< isAsync >::makeReadyResult | ( | T && | res | ) |
| inline protected

Returns the value given in res either as AsyncOpRef<T> or as T depending on the isAsync template param.

Definition at line 53 of file logichelpers.h.

## Member Data Documentation

## ◆ is_async

template<bool isAsync>

bool zyppng::MaybeAsyncMixin< isAsync >::is_async = isAsync
| static constexpr

Definition at line 38 of file logichelpers.h.

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

- zypp/ng/workflows/logichelpers.h