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.§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
Source§impl PartialEq for Collection
impl PartialEq for Collection
Source§impl Serialize for Collection
impl Serialize for Collection
impl StructuralPartialEq for Collection
Auto Trait Implementations§
impl Freeze for Collection
impl RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl UnwindSafe for Collection
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more