Kurlyk
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
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_HEADER_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.