#[repr(C)]pub struct TVMFFIFieldInfo {
pub name: TVMFFIByteArray,
pub doc: TVMFFIByteArray,
pub metadata: TVMFFIByteArray,
pub flags: i64,
pub size: i64,
pub alignment: i64,
pub offset: i64,
pub getter: Option<TVMFFIFieldGetter>,
pub setter: *mut c_void,
pub default_value_or_factory: TVMFFIAny,
pub field_static_type_index: i32,
}Expand description
Information support for optional object reflection
Fields§
§name: TVMFFIByteArrayThe name of the field
doc: TVMFFIByteArrayThe docstring about the field
metadata: TVMFFIByteArrayThe metadata of the field in JSON string
flags: i64bitmask flags of the field
size: i64The size of the field
alignment: i64The alignment of the field
offset: i64The offset of the field
getter: Option<TVMFFIFieldGetter>The getter to access the field
setter: *mut c_voidThe setter to access the field.
When kTVMFFIFieldFlagBitSetterIsFunctionObj is NOT set (default), this is a TVMFFIFieldSetter function pointer cast to *mut c_void. When kTVMFFIFieldFlagBitSetterIsFunctionObj IS set, this is a TVMFFIObjectHandle pointing to a FunctionObj.
The setter is set even if the field is readonly for serialization.
default_value_or_factory: TVMFFIAnyThe default value or factory of the field, this field holds AnyView. Valid when flags set kTVMFFIFieldFlagBitMaskHasDefault. When kTVMFFIFieldFlagBitMaskDefaultFromFactory is also set, this is a callable factory function () -> Any.
field_static_type_index: i32Records the compile-time static type kind of the field.