33 lines
704 B
Swift
33 lines
704 B
Swift
//
|
|
// IdentityStore.swift
|
|
// punchnet
|
|
//
|
|
// Created by 安礼成 on 2026/2/5.
|
|
//
|
|
import Foundation
|
|
|
|
actor IdentityStore {
|
|
typealias IdentityID = UInt32
|
|
|
|
private let publisher: SnapshotPublisher<IdentitySnapshot>
|
|
private let identityMap: [IdentityID: IdentityRuleMap] = [:]
|
|
|
|
init(publisher: SnapshotPublisher<IdentitySnapshot>) {
|
|
self.publisher = publisher
|
|
}
|
|
|
|
func apply(_ id: IdentityID, ruleBytes: Data) {
|
|
|
|
// if model.affectsRuntime {
|
|
// let snapshot = compileSnapshot(from: model)
|
|
// publisher.publish(snapshot)
|
|
// }
|
|
}
|
|
|
|
//
|
|
// func compileSnapshot() -> IdentitySnapshot {
|
|
//
|
|
// }
|
|
//
|
|
}
|