Skip to content

Commit

Permalink
add RESULT enum
Browse files Browse the repository at this point in the history
  • Loading branch information
meltingrabbit committed Mar 1, 2023
1 parent aaee537 commit 8cec6b9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Library/result.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @file
* @brief Result enum の定義
*/
#ifndef RESULT_H_
#define RESULT_H_

/**
* @enum RESULT
* @brief Rust でいうところの Result<T, E> のような,汎用的な返り値用 enum
* @note uint8_t を想定
*/
typedef enum
{
RESULT_OK = 0, //!< OK
RESULT_ERR //!< Error or NG
} RESULT;

#endif

0 comments on commit 8cec6b9

Please sign in to comment.