Structurefwcd.swift-utils 4.6.2Utils
Binding
A mutable, reference-like property wrapper that can read and write a value.
@propertyWrapper struct Binding<Value>
A mutable, reference-like property wrapper that can read and write a value.
@propertyWrapper struct Binding<Value>
import Utils
protocol Sendable
init(get: @escaping () -> Value, set: @escaping (Value) -> Void)
Creates a binding with the given getter and setter.
init(projectedValue: Binding<Value>)
Creates a binding from another.
static func constant(_ value: Value) -> Binding<Value>
Creates an immutable binding.
var projectedValue: Binding<Value> { get }
var wrappedValue: Value { get nonmutating set }
subscript<U>(dynamicMember keyPath: WritableKeyPath<Value, U>) -> Binding<U> { get }
A binding to the value keyed under the given path.