class CreateChild

Defined at line 381 of file fidling/gen/sdk/fidl/fuchsia.component/fuchsia.component/cpp/fidl/fuchsia.component/cpp/markers.h

Creates a child component instance dynamically. When this function

returns successfully, the instance exists, but it may not be running.

The environment of the child instance is determined by the environment

of the collection. `decl` must not set `environment`.

If `decl.startup == EAGER`, or `collection.durability == SINGLE_RUN`,

[CreateChild] will start the component and return once the component is

started. Otherwise, [CreateChild] will return immediately after creating

the component and will not start or resolve it.

Errors:

- `INVALID_ARGUMENTS`: `collection` is not a valid reference or `child`

is not a valid declaration.

- `COLLECTION_NOT_FOUND`: `collection` does not exist.

- `INSTANCE_ALREADY_EXISTS`: `decl.name` already exists in `collection`.

- `INSTANCE_CANNOT_RESOLVE`: `child`'s component declaration failed to resolve

in a `SingleRun` collection.

- `NO_SPACE`: Could not allocate storage for the new instance.

- `INSTANCE_DIED`: This realm no longer exists.

Public Members

static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal