pub struct CreateChildArgs {
pub numbered_handles: Option<Vec<HandleInfo>>,
pub dynamic_offers: Option<Vec<Offer>>,
pub controller: Option<ServerEnd<ControllerMarker>>,
pub dictionary: Option<DictionaryRef>,
/* 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.
dictionary: Option<DictionaryRef>
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, DefaultFuchsiaResourceDialect> for CreateChildArgs
impl Decode<CreateChildArgs, DefaultFuchsiaResourceDialect> for CreateChildArgs
Source§impl Default for CreateChildArgs
impl Default for CreateChildArgs
Source§fn default() -> CreateChildArgs
fn default() -> CreateChildArgs
Source§impl Encode<CreateChildArgs, DefaultFuchsiaResourceDialect> for &mut CreateChildArgs
impl Encode<CreateChildArgs, DefaultFuchsiaResourceDialect> for &mut CreateChildArgs
Source§impl PartialEq for CreateChildArgs
impl PartialEq for CreateChildArgs
Source§impl ResourceTypeMarker for CreateChildArgs
impl ResourceTypeMarker for CreateChildArgs
Source§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
Source§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.