Trait uniffi::LowerError
pub unsafe trait LowerError<UT>: Sized {
// Required method
fn lower_error(obj: Self) -> RustBuffer;
}
Expand description
Reexport items from other uniffi creates Return Rust error values
This is implemented for types that can be the E
param in Result<T, E>
.
It’s is usually derived from Lower, but we sometimes special case it.
§Safety
All traits are unsafe (implementing it requires unsafe impl
) because we can’t guarantee
that it’s safe to pass your type out to foreign-language code and back again. Buggy
implementations of this trait might violate some assumptions made by the generated code,
or might not match with the corresponding code in the generated foreign-language bindings.
These traits should not be used directly, only in generated code, and the generated code should
have fixture tests to test that everything works correctly together.
Required Methods§
fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return
Lower the type into a RustBuffer. RustCallStatus.error_buf
will be set to this.