mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-20 09:11:33 +01:00
* Address @Shared sendability. * Undo UncheckedSendable<UserDefaults>. * clean up * wip * drop AnySendable. * wip * Address `Effect.throttle` sendability (#3325) * Address effect cancellation sendability (#3326) * Address effect cancellation sendability * fix * wip * wip * Separate SendableDefaultSubscript from DefaultSubscript. * fix test * drop escaping * switch on swift 6 language mode * xcode 16 * update test * wip --------- Co-authored-by: Stephen Celis <stephen@stephencelis.com>
21 lines
430 B
Swift
21 lines
430 B
Swift
#if canImport(Combine)
|
|
import Combine
|
|
#endif
|
|
|
|
protocol Reference<Value>: AnyObject, CustomStringConvertible, Sendable {
|
|
associatedtype Value: Sendable
|
|
var value: Value { get set }
|
|
|
|
func access()
|
|
func withMutation<T>(_ mutation: () throws -> T) rethrows -> T
|
|
#if canImport(Combine)
|
|
var publisher: AnyPublisher<Value, Never> { get }
|
|
#endif
|
|
}
|
|
|
|
extension Reference {
|
|
var valueType: Any.Type {
|
|
Value.self
|
|
}
|
|
}
|