A `DistributedActorSystem` designed for local only testing.
It will crash on any attempt of remote communication, but can be useful
for learning about `distributed actor` isolation, as well as early
prototyping stages of development where a real system is not necessary yet.
final func makeInvocationEncoder() -> LocalTestingDistributedActorSystem.InvocationEncoder
Invoked by the Swift runtime when a distributed remote call is about to be made.
The returned `DistributedTargetInvocation` will be populated with all
arguments, generic substitutions, and specific error and return types
that are associated with this specific invocation.
method · iOS 16.0+
resignID
TypeScript
resignID(id: LocalTestingActorID): void
Swift declaration
final func resignID(_ id: LocalTestingDistributedActorSystem.ActorID)
Called during when a distributed actor is deinitialized, or fails to initialize completely (e.g. by throwing
out of an `init` that did not completely initialize all of the actors stored properties yet).
This method is guaranteed to be called at-most-once for a given id (assuming IDs are unique,
and not re-cycled by the system), i.e. if it is called during a failure to initialize completely,
the call from the actor's deinitializer will not happen (as under these circumstances, `deinit` will be run).
If `resignID` gets called with some unknown ID, it should crash immediately as it signifies some
very unexpected use of the system.
- Parameter id: the id of an actor managed by this system that has begun its `deinit`.
init · iOS 16.0+
init
TypeScript
static init(): LocalTestingDistributedActorSystem
Swift declaration
init()
Skipped declarations
6 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.