Identified - mbrandonw/swift-composable-architecture GitHub Wiki

Identified

A wrapper around a value and a hashable identifier that conforms to identifiable.

@dynamicMemberLookup public struct Identified<ID, Value>: Identifiable where ID: Hashable

Inheritance

Identifiable

Initializers

init(_:id:)

Initializes an identified value from a given value and a hashable identifier.

public init(_ value: Value, id: ID)

Parameters

  • value: - value: A value.
  • id: - id: A hashable identifier.

init(_:id:)

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)

Parameters

  • value: - value: A value.
  • id: - id: A hashable identifier.

init(_:id:)

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)

Parameters

  • value: - value: A value.
  • id: - id: A key path from the value to a hashable identifier.

Properties

id

let id: ID

value

var value: Value
⚠️ **GitHub.com Fallback** ⚠️