[ox/std] Add Result::transformError

This commit is contained in:
2025-07-24 01:24:11 -05:00
parent a523a75e4b
commit fdf39d1a25

View File

@ -307,6 +307,13 @@ struct [[nodiscard]] Result {
return std::move(value);
}
constexpr Result transformError(ErrorCode const ec, CString const msg) && {
if (error) {
error = Error{ec, msg};
}
return *this;
}
};
namespace detail {