allow task setters to return error values

This commit is contained in:
Dustin J. Mitchell
2022-01-31 19:34:21 +00:00
parent 8bd9605b25
commit ef0bb2ced4
4 changed files with 75 additions and 49 deletions

View File

@@ -1,10 +1,11 @@
// TODO: make true = 1, false = 0, error = -1
/// A result combines a boolean success value with
/// an error response. It is equivalent to `Result<bool, ()>`.
/// cbindgen:prefix-with-name
/// cbindgen:rename-all=ScreamingSnakeCase
#[repr(C)]
pub enum TCResult {
True,
False,
Error,
Error = -1,
False = 0,
True = 1,
}