Required Instance Methodswift 6.0.1Distributed

    assignID(_:)

    Assign an ActorID for the passed actor type.

    iOS
    16.0+
    macOS
    13.0+
    tvOS
    16.0+
    watchOS
    9.0+
    func assignID<Act>(_ actorType: Act.Type) -> Self.ActorID where Act : DistributedActor, Self.ActorID == Act.ID

    This function is invoked by a distributed actor during its initialization, and the returned address value is stored along with it for the time of its lifetime.

    The address MUST uniquely identify the actor, and allow resolving it. E.g. if an actor is created under address addr1 then immediately invoking system.resolve(id: addr1, as: Greeter.self) MUST return a reference to the same actor.

    Other requirements

    Type members

    • associatedtype ActorID

      The type ID that will be assigned to any distributed actor managed by this actor system.

    • associatedtype InvocationDecoder

      Type of DistributedTargetInvocationDecoder that should be used when decoding invocations during executeDistributedTarget(on:target:invocationDecoder:handler:) calls.

    • associatedtype InvocationEncoder

      Type of DistributedTargetInvocationEncoder that should be used when the Swift runtime needs to encode a distributed target call into an encoder, before passing it off to remoteCall(...).

    • associatedtype ResultHandler

      The type of the result handler which will be offered the results returned by a distributed function invocation called via executeDistributedTarget(on:target:invocationDecoder:handler:).

    • associatedtype SerializationRequirement

      The serialization requirement that will be applied to all distributed targets used with this system.

    Instance members