Allow vodozemac to work without c++ exceptions
Summary: This allows you to use libvodozemac in a c++ application without exceptions.
For each function that, in Rust, returns Result<T>
, it adds a noexcept function called FUNC_NAME_noexcept
that returns Box<Maybe<T>>
. T
or the error can further be extracted from the return value, by moving them out of the Maybe
. After extraction, the Maybe
will be invalidated and cannot be used again.
BUG: https://iron.lily-is.land/T139
Type: add
Test Plan:
-
Write unit tests to compile with -fno-exception and verify they pass. -
Add docs about how to use the noexcept functions. -
Build libkazv against this and verify kazv still works.
Edited by tusooa