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

Lower this value for scaffolding function return

Lower the type into a RustBuffer. RustCallStatus.error_buf will be set to this.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<K, V, UT> LowerError<UT> for HashMap<K, V>
where HashMap<K, V>: Lower<UT>,

§

fn lower_error(obj: HashMap<K, V>) -> RustBuffer

§

impl<T, UT> LowerError<UT> for Arc<T>
where Arc<T>: Lower<UT>, T: ?Sized,

§

impl<T, UT> LowerError<UT> for Vec<T>
where Vec<T>: Lower<UT>,

§

impl<UT> LowerError<UT> for bool

§

impl<UT> LowerError<UT> for f32

§

impl<UT> LowerError<UT> for f64

§

impl<UT> LowerError<UT> for i8

§

impl<UT> LowerError<UT> for i16

§

impl<UT> LowerError<UT> for i32

§

impl<UT> LowerError<UT> for i64

§

impl<UT> LowerError<UT> for u8

§

impl<UT> LowerError<UT> for u16

§

impl<UT> LowerError<UT> for u32

§

impl<UT> LowerError<UT> for u64

§

impl<UT> LowerError<UT> for String

§

impl<UT> LowerError<UT> for SystemTime

Implementors§

§

impl<T, UT> LowerError<UT> for Option<T>
where Option<T>: Lower<UT>,

§

impl<UT> LowerError<UT> for Duration