Kurlyk
Loading...
Searching...
No Matches
SubmitResult.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _KURLYK_TYPES_SUBMIT_RESULT_HPP_INCLUDED
3#define _KURLYK_TYPES_SUBMIT_RESULT_HPP_INCLUDED
4
7
8#include <system_error>
9
10namespace kurlyk {
11
14 struct SubmitResult {
15 bool accepted = false;
16 std::error_code error_code;
17
19 explicit operator bool() const {
20 return accepted;
21 }
22 };
23
24} // namespace kurlyk
25
26#endif // _KURLYK_TYPES_SUBMIT_RESULT_HPP_INCLUDED
Primary namespace for the Kurlyk library, encompassing initialization, request management,...
Represents the synchronous result of trying to enqueue or submit work.
bool accepted
Indicates whether the work item was accepted for processing.
std::error_code error_code
Describes the rejection reason when accepted is false.