pub unsafe trait OptionalCompatible: AnyCompatible { }Expand description
Marker for values whose C++ ffi::Optional<T> uses the 16-byte
TVMFFIAny representation.
Object classes deliberately do not implement this trait. Use Option<X>
for those values; it is the pointer-sized mirror of C++’s nullable
ObjectPtr-backed optional.
ⓘ
use tvm_ffi::{Array, Optional};
let _ = Optional::<Array<i64>>::none();Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".