pub struct Collection {
pub name: Name,
pub durability: Durability,
pub environment: Option<EnvironmentRef>,
pub allowed_offers: Option<AllowedOffers>,
pub allow_long_names: Option<bool>,
pub persistent_storage: Option<bool>,
}
Expand description
Example:
collections: [
{
name: "tests",
durability: "transient",
},
],
Fields§
§name: Name
The name of the component collection, which is a string of one or
more of the following characters: a-z
, 0-9
, _
, .
, -
. The name
identifies this collection when used in a reference.
durability: Durability
The duration of child component instances in the collection.
transient
: The instance exists until its parent is stopped or it is explicitly destroyed.single_run
: The instance is started when it is created, and destroyed when it is stopped.
environment: Option<EnvironmentRef>
If present, the environment that will be
assigned to instances in this collection, one of
environments
. If omitted, instances in this collection
will inherit the same environment assigned to this component.
allowed_offers: Option<AllowedOffers>
Constraints on the dynamic offers that target the components in this collection.
Dynamic offers are specified when calling fuchsia.component.Realm/CreateChild
.
static_only
: Only those specified in this.cml
file. No dynamic offers. This is the default.static_and_dynamic
: Both static offers and those specified at runtime withCreateChild
are allowed.
allow_long_names: Option<bool>
Allow child names up to 1024 characters long instead of the usual 255 character limit. Default is false.
persistent_storage: Option<bool>
If set to true
, the data in isolated storage used by dynamic child instances and
their descendants will persist after the instances are destroyed. A new child instance
created with the same name will share the same storage path as the previous instance.
Trait Implementations§
Source§impl Debug for Collection
impl Debug for Collection
Source§impl<'de> Deserialize<'de> for Collection
impl<'de> Deserialize<'de> for Collection
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>,
Source§impl MarkdownReferenceDocGenerator for Collection
impl MarkdownReferenceDocGenerator for Collection
Source§fn get_reference_doc_markdown() -> String
fn get_reference_doc_markdown() -> String
ReferenceDoc
. The returned Markdown
indents any #
Markdown headers in individual field doc comments
to ensure a well structured final Markdown document.