ThreadSafeBox
Thread-safe value boxing structure
@dynamicMemberLookup final class ThreadSafeBox<Value>
Thread-safe value boxing structure
@dynamicMemberLookup final class ThreadSafeBox<Value>
import Basics
init()
init(_ seed: Value)
subscript<T>(dynamicMember keyPath: WritableKeyPath<Value, T?>) -> T? { get set }
subscript<T>(dynamicMember keyPath: KeyPath<Value, T>) -> T? { get }
func clear()
func get() -> Value?
func get(default: Value) -> Value
@discardableResult func memoize(body: () throws -> Value) rethrows -> Value
func mutate(body: (Value?) throws -> Value?) rethrows
func put(_ newValue: Value)
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Sendable
protocol Escapable
@frozen struct String
A Unicode string value that is a collection of characters.
func append(_ value: String)
@frozen struct Int
A signed integer value type.
func decrement()
func increment()