You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// ### Decoding DistributedActor arguments using Codable
854
+
/// When using an actor system where ``ActorID`` is ``Codable``, every distributed actor using that system
855
+
/// is also implicitly ``Codable`` (see ``DistributedActorSystem``). Such distributed actors are encoded
856
+
/// as their ``ActorID`` stored in an ``Encoder/singleValueContainer``. When ``Codable`` is being used
857
+
/// by such a system, the ``decodeNextArgument`` method will be using ``Decoder`` to
858
+
/// decode the incoming values, which may themselves be distributed actors.
859
+
///
860
+
/// An actor system must be provided to the ``Decoder`` in order for a distributed actor's ``Decodable/init(from:)``
861
+
/// to be able to return the instance of the actor. Specifically, the decoded``ActorID`` is passed to the actor system's `resolve(id:as:)` method in order to
862
+
/// return either a local instance identified by this ID, or creating a remote actor reference.
863
+
/// Thus, you must set the actor system the decoding is performed for, on the decoder's `userInfo`, as follows:
0 commit comments