pub trait StateValue: StoredValue {
// Required method
fn state_field_type() -> &'static [u8] ⓘ;
}Expand description
A type @State can hold.
State<V> is the value followed by the location box SwiftUI installs, so
its width follows V: sixteen bytes for the three scalars, twenty-four for
a String. The box is therefore the last word rather than the one at
offset eight, which is what an earlier Int-only reading of it assumed.
Required Methods§
Sourcefn state_field_type() -> &'static [u8] ⓘ
fn state_field_type() -> &'static [u8] ⓘ
The mangled State<Self>, NUL-terminated, for the field record.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".