@@ -18,13 +18,13 @@ import Distributed
1818// ==== ----------------------------------------------------------------------------------------------------------------
1919// MARK: ActorMetadata
2020
21- public struct ActorMetadataKeys {
21+ public enum ActorMetadataKeys {
2222 public typealias Key = ActorMetadataKey
2323}
2424
2525extension ActorMetadataKeys {
2626 var path : Key < ActorPath > { " $path " }
27-
27+
2828 var type : Key < ActorTypeTagValue > { " $type " }
2929 struct ActorTypeTagValue : Codable { // FIXME: improve representation to be more efficient
3030 let mangledName : String
@@ -82,7 +82,7 @@ public final class ActorMetadata: CustomStringConvertible, CustomDebugStringConv
8282 self . _storage [ id] = newValue
8383 }
8484 }
85-
85+
8686 subscript( _ id: String ) -> ( any Sendable & Codable ) ? {
8787 get {
8888 self . lock. wait ( )
@@ -122,9 +122,7 @@ public final class ActorMetadata: CustomStringConvertible, CustomDebugStringConv
122122// ==== ----------------------------------------------------------------------------------------------------------------
123123// MARK: ActorTagKey
124124
125- public protocol AnyActorMetadataKey {
126-
127- }
125+ public protocol AnyActorMetadataKey { }
128126
129127/// Declares a key to be used with ``ActorMetadata``, which allows attaching various metadata to an ``ActorID``.
130128public struct ActorMetadataKey < Value: Codable & Sendable > : Hashable , ExpressibleByStringLiteral {
@@ -140,28 +138,28 @@ public struct ActorMetadataKey<Value: Codable & Sendable>: Hashable, Expressible
140138}
141139
142140///// Used to tag actor identities with additional information.
143- //public protocol ActorMetadataProtocol: Sendable where Value == Key.Value {
141+ // public protocol ActorMetadataProtocol: Sendable where Value == Key.Value {
144142// /// Type of the actor tag key, used to obtain an actor tag instance.
145143// associatedtype Key: ActorTagKey<Value>
146144//
147145// /// Type of the value stored by this tag.
148146// associatedtype Value
149147//
150148// var value: Value { get }
151- //}
149+ // }
152150//
153- //@available(*, deprecated, message: "remove this")
154- //public protocol ActorTagKey<Value>: Sendable {
151+ // @available(*, deprecated, message: "remove this")
152+ // public protocol ActorTagKey<Value>: Sendable {
155153// associatedtype Value: Sendable & Codable
156154// static var id: String { get }
157- //}
155+ // }
158156//
159157//// ==== ----------------------------------------------------------------------------------------------------------------
160158//
161- //extension ActorMetadataProtocol {
159+ // extension ActorMetadataProtocol {
162160// /// String representation of the unique key tag identity, equal to `Key.id`.
163161// ///
164162// /// Tag keys should be unique, and must not start with $ unless they are declared by the ClusterSystem itself.
165163// public var id: String { Key.id }
166164// public var keyType: Key.Type { Key.self }
167- //}
165+ // }
0 commit comments