Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Sources/OpenSwiftUICore/Graph/GraphValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,34 @@
// GraphValue.swift
// OpenSwiftUICore
//
// Audited for iOS 18.0
// Audited for 6.5.4
// Status: Complete

public import OpenGraphShims

/// A transient reference to a value in the view hierarchy's dataflow
/// graph. "Transient" means that these values must never be stored,
/// only passed around while initializing views.
@available(OpenSwiftUI_v1_0, *)
public struct _GraphValue<Value>: Equatable {
package var value: Attribute<Value>

@available(OpenSwiftUI_v6_0, *)
@_spi(ForOpenSwiftUIOnly)
public init(_ value: Attribute<Value>) {
self.value = value
}

@available(OpenSwiftUI_v6_0, *)
@_spi(ForOpenSwiftUIOnly)
@inlinable
public init<U>(_ value: U) where Value == U.Value, U: Rule {
self.init(Attribute(value))
}

@available(OpenSwiftUI_v6_0, *)
@_spi(ForOpenSwiftUIOnly)
@inlinable
public init<U>(_ value: U) where Value == U.Value, U: StatefulRule {
self.init(Attribute(value))
}
Expand Down