pub unsafe trait ValidField {
// Required method
fn valid_field(ty: Value<'_, '_>) -> bool;
}Expand description
Trait used to check if a field of a Rust type and Julia type have matching layouts.
Layouts for immutable types generated by JlrsReflect.jl derive this trait. Mutable types
must use Option<WeakValue> because they’re not stored inline when used as a field type.
Required Methods§
Sourcefn valid_field(ty: Value<'_, '_>) -> bool
fn valid_field(ty: Value<'_, '_>) -> bool
Returns true if Self is the correct representation for Julia data of type ty
when it’s used as a field type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".