Trait uniffi::LiftRef

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

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>

Implementations on Foreign Types§

§

impl<UT> LiftRef<UT> for i8

§

type LiftType = i8

§

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

§

impl<UT> LiftRef<UT> for f32

§

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

§

type LiftType = Vec<T, Global>

§

impl<UT> LiftRef<UT> for f64

§

impl<UT> LiftRef<UT> for u16

§

impl<UT> LiftRef<UT> for u8

§

type LiftType = u8

§

impl<UT> LiftRef<UT> for String

§

impl<UT> LiftRef<UT> for u32

§

impl<UT> LiftRef<UT> for bool

§

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

§

type LiftType = Vec<T, Global>

§

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

§

type LiftType = Arc<T>

§

impl<UT> LiftRef<UT> for i16

§

impl<UT> LiftRef<UT> for u64

§

impl<UT> LiftRef<UT> for SystemTime

§

impl<UT> LiftRef<UT> for i64

§

impl<UT> LiftRef<UT> for str

§

impl<UT> LiftRef<UT> for i32

Implementors§

§

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

§

type LiftType = Option<T>

§

impl<UT> LiftRef<UT> for Duration