Contents

init(from:)

Initializes an instance of this distributed actor by decoding its Id, and passing it to the Distributedactorsystem obtained from decoder.userInfo[actorSystemKey].

Declaration

nonisolated init(from decoder: any Decoder) throws

Parameters

  • decoder:

    Used to decode the ID of this distributed actor.

Requires: The decoder must have the ``CodingUserInfoKey/actorSystemKey`` set to

the ActorSystem that this actor expects, as it will be used to call resolve(id:using:) on, in order to obtain the instance this initializer should return.