Cotton code
27 lines · 806 B · SwiftRaw
// A contact point a face hands off to the phone, the mail app or Instagram// (`ContactHandoff`): its value and what kind of point it is. The kind a// `reach` column's values are is read in the app (`CottonUI/Faces/Handoff.swift`).import Foundation/// One contact point, and which kind it is.public struct ContactTarget: Identifiable, Equatable, Sendable {    public enum Kind: Equatable, Sendable {        case phone, email, instagram    }    public let value: String    public let kind: Kind    public var id: String {        switch kind {        case .phone: return "p:\(value)"        case .email: return "e:\(value)"        case .instagram: return "i:\(value)"        }    }    public init(value: String, kind: Kind) {        self.value = value        self.kind = kind    }}