Struct fidl_fuchsia_component::CreateChildArgs
source · pub struct CreateChildArgs {
pub numbered_handles: Option<Vec<HandleInfo>>,
pub dynamic_offers: Option<Vec<Offer>>,
pub controller: Option<ServerEnd<ControllerMarker>>,
pub config_capabilities: Option<Vec<Configuration>>,
pub dictionary: Option<ClientEnd<DictionaryMarker>>,
/* private fields */
}
Fields§
§numbered_handles: Option<Vec<HandleInfo>>
The numbered handles to pass to the component instance.
If the runner for the component does not support the numbered handles it is expected to close the handles.
dynamic_offers: Option<Vec<Offer>>
Dynamic offers that will target the component instance.
Including OfferDecl
s in this vector will cause additional capabilities
to be offered to the newly created child, beyond the OfferDecl
s in the
parent’s ComponentDecl
that target the collection.
Any kind of offer (e.g., protocol, directory) can be used as a dynamic
offer. Any source that would be valid for a static offer is also valid
for a dynamic offer. Additionally, unlike static offers, dynamic offers
can use a “sibling” dynamic child component as a source by setting the
source to a ChildRef
that sets the collection
field.
Dynamic offers always target the newly created child component. As a
result, OfferDecl
s in dynamic_offers
must not set the target
field, as its value is implied.
If either the source (that is, the component named in the source
field
of the OfferDecl
) or the target of a dynamic offer is destroyed, the
offer itself is destroyed simultaneously.
In order to set this field to a non-empty value, the collection in which
the child component is being created must specify
ComponentDecl.allowed_offers = STATIC_AND_DYNAMIC
.
controller: Option<ServerEnd<ControllerMarker>>
The controller for this component, which may be used to influence the component’s lifecycle.
config_capabilities: Option<Vec<Configuration>>
Configuration Capabilities that will target the component instance.
Including a Configuration in this list will add the Configuration Capability as a dynamic capability in the current realm. It will also create a dynamic offer for this capability to the child.
The dynamic offer that is created is from self
to the newly created child.
If the newly created child is destroyed, both the configuration capability and its resulting dynamic offer will be destroyed.
In order to set this field to a non-empty value, the collection in which
the child component is being created must specify
ComponentDecl.allowed_offers = STATIC_AND_DYNAMIC
.
dictionary: Option<ClientEnd<DictionaryMarker>>
A dictionary that contains extra capabilities for the component instance.
Trait Implementations§
source§impl Debug for CreateChildArgs
impl Debug for CreateChildArgs
source§impl Decode<CreateChildArgs> for CreateChildArgs
impl Decode<CreateChildArgs> for CreateChildArgs
source§impl Default for CreateChildArgs
impl Default for CreateChildArgs
source§fn default() -> CreateChildArgs
fn default() -> CreateChildArgs
source§impl Encode<CreateChildArgs> for &mut CreateChildArgs
impl Encode<CreateChildArgs> for &mut CreateChildArgs
source§impl PartialEq for CreateChildArgs
impl PartialEq for CreateChildArgs
source§fn eq(&self, other: &CreateChildArgs) -> bool
fn eq(&self, other: &CreateChildArgs) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl ResourceTypeMarker for CreateChildArgs
impl ResourceTypeMarker for CreateChildArgs
§type Borrowed<'a> = &'a mut CreateChildArgs
type Borrowed<'a> = &'a mut CreateChildArgs
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moresource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).source§impl TypeMarker for CreateChildArgs
impl TypeMarker for CreateChildArgs
§type Owned = CreateChildArgs
type Owned = CreateChildArgs
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.