Skip to main content

binding_write

Function binding_write 

Source
pub unsafe fn binding_write(
    binding: &mut [u8],
    value: &mut [u8],
    mangled: &[u8],
)
Expand description

Write through a Binding<Bool>, exactly as a control does when the user interacts with it. Used to prove the write-back path end to end. Write through a Binding<T> the way a control does — SwiftUI’s own wrappedValue setter, reached through its dispatch thunk.

This is what makes a bound control testable without a touch: build the control’s binding, write through it, and see whether the Rust value moved.

§Safety

value must be the little-endian bytes of the type mangled names, and binding must be a Binding of that type.