pub struct Child {
pub name: Name,
pub url: Url,
pub startup: StartupMode,
pub on_terminate: Option<OnTerminate>,
pub environment: Option<EnvironmentRef>,
}
Expand description
Example:
children: [
{
name: "logger",
url: "fuchsia-pkg://fuchsia.com/logger#logger.cm",
},
{
name: "pkg_cache",
url: "fuchsia-pkg://fuchsia.com/pkg_cache#meta/pkg_cache.cm",
startup: "eager",
},
{
name: "child",
url: "#meta/child.cm",
}
],
Fields§
§name: Name
The name of the child component instance, which is a string of one
or more of the following characters: a-z
, 0-9
, _
, .
, -
. The name
identifies this component when used in a reference.
url: Url
The [component URL][component-url] for the child component instance.
startup: StartupMode
The component instance’s startup mode. One of:
lazy
(default): Start the component instance only if another component instance binds to it.- [
eager
][doc-eager]: Start the component instance as soon as its parent starts.
on_terminate: Option<OnTerminate>
Determines the fault recovery policy to apply if this component terminates.
none
(default): Do nothing.reboot
: Gracefully reboot the system if the component terminates for any reason. This is a special feature for use only by a narrow set of components; see [Termination policies][doc-reboot-on-terminate] for more information.
environment: Option<EnvironmentRef>
If present, the name of the environment to be assigned to the child component instance, one
of environments
. If omitted, the child will inherit the same environment
assigned to this component.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Child
impl<'de> Deserialize<'de> for Child
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MarkdownReferenceDocGenerator for Child
impl MarkdownReferenceDocGenerator for Child
Source§fn get_reference_doc_markdown() -> String
fn get_reference_doc_markdown() -> String
Returns a Markdown representation of the reference docs for the
struct that is derived from
ReferenceDoc
. The returned Markdown
indents any #
Markdown headers in individual field doc comments
to ensure a well structured final Markdown document.§fn get_reference_doc_markdown_with_options(
indent_headers_by: usize,
indent_with_spaces: usize,
) -> String
fn get_reference_doc_markdown_with_options( indent_headers_by: usize, indent_with_spaces: usize, ) -> String
This method is called internally by the reference doc generator when
recursing to generate documentation for field types.
impl StructuralPartialEq for Child
Auto Trait Implementations§
impl Freeze for Child
impl RefUnwindSafe for Child
impl Send for Child
impl Sync for Child
impl Unpin for Child
impl UnwindSafe for Child
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more