Trait uniffi::LiftRef

source ·
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§

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

§

type LiftType = HashMap<K, V>

source§

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

§

type LiftType = Vec<T>

source§

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

§

type LiftType = Arc<T>

source§

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

§

type LiftType = Vec<T>

source§

impl<UT> LiftRef<UT> for bool

source§

impl<UT> LiftRef<UT> for f32

source§

impl<UT> LiftRef<UT> for f64

source§

impl<UT> LiftRef<UT> for i8

§

type LiftType = i8

source§

impl<UT> LiftRef<UT> for i16

source§

impl<UT> LiftRef<UT> for i32

source§

impl<UT> LiftRef<UT> for i64

source§

impl<UT> LiftRef<UT> for str

source§

impl<UT> LiftRef<UT> for u8

§

type LiftType = u8

source§

impl<UT> LiftRef<UT> for u16

source§

impl<UT> LiftRef<UT> for u32

source§

impl<UT> LiftRef<UT> for u64

source§

impl<UT> LiftRef<UT> for String

source§

impl<UT> LiftRef<UT> for SystemTime

Implementors§

source§

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

§

type LiftType = Option<T>

source§

impl<UT> LiftRef<UT> for Duration