Kurlyk
Toggle main menu visibility
Loading...
Searching...
No Matches
SubmitResult.hpp
Go to the documentation of this file.
1
#pragma once
2
#ifndef KURLYK_HEADER_KURLYK_TYPES_SUBMIT_RESULT_HPP_INCLUDED
3
#define KURLYK_HEADER_KURLYK_TYPES_SUBMIT_RESULT_HPP_INCLUDED
4
7
8
#include <system_error>
9
10
namespace
kurlyk
{
11
14
struct
SubmitResult
{
15
bool
accepted
=
false
;
16
std::error_code
error_code
;
17
19
SubmitResult
() {}
20
24
SubmitResult
(
bool
is_accepted,
const
std::error_code& error)
25
:
accepted
(is_accepted),
error_code
(error) {}
26
28
explicit
operator
bool()
const
{
29
return
accepted
;
30
}
31
};
32
33
}
// namespace kurlyk
34
35
#endif
// KURLYK_HEADER_KURLYK_TYPES_SUBMIT_RESULT_HPP_INCLUDED
kurlyk
Primary namespace for the Kurlyk library, encompassing initialization, request management,...
kurlyk::SubmitResult::accepted
bool accepted
Indicates whether the work item was accepted for processing.
Definition
SubmitResult.hpp:15
kurlyk::SubmitResult::SubmitResult
SubmitResult(bool is_accepted, const std::error_code &error)
Constructs an admission result.
Definition
SubmitResult.hpp:24
kurlyk::SubmitResult::SubmitResult
SubmitResult()
Constructs a rejected result without an error code.
Definition
SubmitResult.hpp:19
kurlyk::SubmitResult::error_code
std::error_code error_code
Describes the rejection reason when accepted is false.
Definition
SubmitResult.hpp:16
include
kurlyk
types
SubmitResult.hpp
Generated by
1.17.0