pub unsafe trait LateField<S: LateStruct>:
Sized
+ 'static
+ LateFieldSealed<S> {
type Value: 'static + Default;
// Required methods
fn raw_descriptor() -> &'static RawLateFieldDescriptor;
fn coerce(value: *mut Self::Value) -> *mut S::EraseTo;
// Provided method
fn descriptor() -> &'static LateFieldDescriptor<S> { ... }
}Expand description
A trait for a marker type representing a field in a late-initialized structure.
This trait cannot be implemented manually. Instead, it should be implemented using the
late_field! macro. Most documentation for this trait can be found there.
§Safety
This trait can only be safely implemented through the late_field! macro.
Required Associated Types§
Required Methods§
Sourcefn raw_descriptor() -> &'static RawLateFieldDescriptor
fn raw_descriptor() -> &'static RawLateFieldDescriptor
Fetches the untyped descriptor associated with this field.
See LateField::descriptor for a typed version of this method.
Provided Methods§
Sourcefn descriptor() -> &'static LateFieldDescriptor<S>
fn descriptor() -> &'static LateFieldDescriptor<S>
Fetches the strongly-typed descriptor associated with this field.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".