pub unsafe trait OptionalCompatible: AnyCompatible { }Expand description
Marker for the types whose optional the ABI stores as one 16-byte
TVMFFIAny cell, the types Optional<T> accepts.
Object types deliberately do not implement it: use Option<X>, one
nullable pointer, for those.
§Safety
Implement only for types whose optional the ABI stores as a TVMFFIAny
cell; for an object type it would mismatch the ABI’s nullable pointer.
ⓘ
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", so this trait is not object safe.