pub struct Collection {
pub name: Option<String>,
pub durability: Option<Durability>,
pub environment: Option<String>,
pub allowed_offers: Option<AllowedOffers>,
pub allow_long_names: Option<bool>,
pub persistent_storage: Option<bool>,
/* private fields */
}
Expand description
Statically declares a component instance collection.
Fields§
§name: Option<String>
(Required) The name of the collection. Instances created in the collection are scoped to this name.
durability: Option<Durability>
(Required) The durability of instances in the collection.
environment: Option<String>
(Optional) The environment assigned to child instances in this collection.
May be unset, in which case children in this collection will inherit the
parent component’s environment. If set, the name must reference an
environment defined in the ComponentDecl
and it must contain only the
following characters: [a-z0-9-_.].
allowed_offers: Option<AllowedOffers>
(Optional, defaults to STATIC_ONLY
) The kinds of offers that can
target the child instances in this collection.
Only components using the dynamic_offers
restricted feature may set
this field.
allow_long_names: Option<bool>
(Optional, defaults to false
) Whether child instances in this
collection can have names longer than the default length limit of 100.
Only components using the allow_long_names
restricted feature may set
this field.
persistent_storage: Option<bool>
(Optional) Whether the data in isolated storage used by dynamic child instances and their descendants will persist after the instances are destroyed. New dynamic instances inherit the previous instances’ data stores.
This setting can be overridden by a lower-level collection that is a descendant of a collection that enables/disables this setting.
This setting applies to all storage capabilities consumed by the collection components and their descendants.
The default is the value inherited from an ancestral collection if set,
otherwise false
.
Trait Implementations§
Source§impl Clone for Collection
impl Clone for Collection
Source§fn clone(&self) -> Collection
fn clone(&self) -> Collection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Collection
impl Debug for Collection
Source§impl<D: ResourceDialect> Decode<Collection, D> for Collection
impl<D: ResourceDialect> Decode<Collection, D> for Collection
Source§impl Default for Collection
impl Default for Collection
Source§fn default() -> Collection
fn default() -> Collection
Source§impl<D: ResourceDialect> Encode<Collection, D> for &Collection
impl<D: ResourceDialect> Encode<Collection, D> for &Collection
Source§impl PartialEq for Collection
impl PartialEq for Collection
Source§impl TypeMarker for Collection
impl TypeMarker for Collection
Source§type Owned = Collection
type Owned = Collection
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.Source§impl ValueTypeMarker for Collection
impl ValueTypeMarker for Collection
Source§type Borrowed<'a> = &'a Collection
type Borrowed<'a> = &'a Collection
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable 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§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)