Trait uniffi::LiftRef

pub unsafe trait LiftRef<UT> {
    type LiftType: Lift<UT> + Borrow<Self>;
}
Expand description

Reexport items from other uniffi creates Lift references

This is usually derived from Lift and also implemented for the inner T value of smart pointers. For example, if Lift is implemented for Arc<T>, then we implement this to lift

§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. &T using the Arc.

Required Associated Types§

type LiftType: Lift<UT> + Borrow<Self>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<K, V, UT> LiftRef<UT> for HashMap<K, V>
where HashMap<K, V>: Lift<UT>,

§

type LiftType = HashMap<K, V>

§

impl<T, UT> LiftRef<UT> for [T]
where T: Lift<UT>,

§

type LiftType = Vec<T>

§

impl<T, UT> LiftRef<UT> for Arc<T>
where Arc<T>: Lift<UT>, T: ?Sized,

§

type LiftType = Arc<T>

§

impl<T, UT> LiftRef<UT> for Vec<T>
where Vec<T>: Lift<UT>,

§

type LiftType = Vec<T>

§

impl<UT> LiftRef<UT> for bool

§

impl<UT> LiftRef<UT> for f32

§

impl<UT> LiftRef<UT> for f64

§

impl<UT> LiftRef<UT> for i8

§

type LiftType = i8

§

impl<UT> LiftRef<UT> for i16

§

impl<UT> LiftRef<UT> for i32

§

impl<UT> LiftRef<UT> for i64

§

impl<UT> LiftRef<UT> for str

§

impl<UT> LiftRef<UT> for u8

§

type LiftType = u8

§

impl<UT> LiftRef<UT> for u16

§

impl<UT> LiftRef<UT> for u32

§

impl<UT> LiftRef<UT> for u64

§

impl<UT> LiftRef<UT> for String

§

impl<UT> LiftRef<UT> for SystemTime

Implementors§

§

impl<T, UT> LiftRef<UT> for Option<T>
where Option<T>: Lift<UT>,

§

type LiftType = Option<T>

§

impl<UT> LiftRef<UT> for Duration