Identified - mbrandonw/swift-composable-architecture GitHub Wiki
A wrapper around a value and a hashable identifier that conforms to identifiable.
@dynamicMemberLookup public struct Identified<ID, Value>: Identifiable where ID: HashableIdentifiable
Initializes an identified value from a given value and a hashable identifier.
public init(_ value: Value, id: ID)- value: - value: A value.
- id: - id: A hashable identifier.
Initializes an identified value from a given value and a function that can return a hashable identifier from the value.
public init(_ value: Value, id: (Value) -> ID)Identified(uuid, id: \.self)
- value: - value: A value.
- id: - id: A hashable identifier.
Initializes an identified value from a given value and a function that can return a hashable identifier from the value.
public init(_ value: Value, id: KeyPath<Value, ID>)Identified(uuid, id: \.self)
- value: - value: A value.
- id: - id: A key path from the value to a hashable identifier.
let id: IDvar value: Value