-
public interface DittoHandleContainer for the rust handle to the main Ditto instance that lives behind the FFI layer.
-
-
Method Summary
Modifier and Type Method Description abstract <R extends Any> Rwith(Function1<SWIGTYPE_p_CDitto, R> ffiUsage)Yields a scope wherein the so obtained "raw" handle is protected from being deällocated right under our feet, even with multiple threads. UnitifNonNull(Function1<SWIGTYPE_p_CDitto, Unit> ffiUsage)<R extends Any> RwithUnwrapped(String methodName, Function1<SWIGTYPE_p_CDitto, R> ffiUsage)-
-
Method Detail
-
with
abstract <R extends Any> R with(Function1<SWIGTYPE_p_CDitto, R> ffiUsage)
Yields a scope wherein the so obtained "raw" handle is protected from being deällocated right under our feet, even with multiple threads.
Note: doing
.with { it }achieves the same as the old.handlegetter (modulo a very short-livedsynchronized(this)critical section) and thus defeats the point of the API: do not let these "raw" FFI resources escape the scope!
-
ifNonNull
Unit ifNonNull(Function1<SWIGTYPE_p_CDitto, Unit> ffiUsage)
-
withUnwrapped
<R extends Any> R withUnwrapped(String methodName, Function1<SWIGTYPE_p_CDitto, R> ffiUsage)
-
-
-
-