Lightweight 0.20260921.0
Loading...
Searching...
No Matches
Lightweight::SqlRetryDecision Struct Reference

#include <SqlRetryPolicy.hpp>

Public Member Functions

constexpr operator bool () const noexcept
 

Public Attributes

SqlRetryAction action {}
 Whether to retry or to surface the failure.
 
std::chrono::milliseconds delay {}
 
SqlRetryGiveUpReason reason { SqlRetryGiveUpReason::None }
 Why the policy gave up. SqlRetryGiveUpReason::None when it did not.
 

Detailed Description

The outcome of SqlRetryPolicy::Decide.

Definition at line 97 of file SqlRetryPolicy.hpp.

Member Function Documentation

◆ operator bool()

constexpr Lightweight::SqlRetryDecision::operator bool ( ) const
inlineexplicitconstexprnoexcept
Returns
true when the caller should retry.

Definition at line 110 of file SqlRetryPolicy.hpp.

References action, and Retry.

Member Data Documentation

◆ action

SqlRetryAction Lightweight::SqlRetryDecision::action {}

Whether to retry or to surface the failure.

Definition at line 100 of file SqlRetryPolicy.hpp.

Referenced by operator bool().

◆ delay

std::chrono::milliseconds Lightweight::SqlRetryDecision::delay {}

How long to wait before the next attempt. Zero unless action is SqlRetryAction::Retry.

Definition at line 104 of file SqlRetryPolicy.hpp.

◆ reason

SqlRetryGiveUpReason Lightweight::SqlRetryDecision::reason { SqlRetryGiveUpReason::None }

Why the policy gave up. SqlRetryGiveUpReason::None when it did not.

Definition at line 107 of file SqlRetryPolicy.hpp.


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