pub struct ComponentDecl {
pub program: Option<ProgramDecl>,
pub uses: Vec<UseDecl>,
pub exposes: Vec<ExposeDecl>,
pub offers: Vec<OfferDecl>,
pub capabilities: Vec<CapabilityDecl>,
pub children: Vec<ChildDecl>,
pub collections: Vec<CollectionDecl>,
pub facets: Option<Dictionary>,
pub environments: Vec<EnvironmentDecl>,
pub config: Option<ConfigDecl>,
}
Fields§
§program: Option<ProgramDecl>
§uses: Vec<UseDecl>
§exposes: Vec<ExposeDecl>
§offers: Vec<OfferDecl>
§capabilities: Vec<CapabilityDecl>
§children: Vec<ChildDecl>
§collections: Vec<CollectionDecl>
§facets: Option<Dictionary>
§environments: Vec<EnvironmentDecl>
§config: Option<ConfigDecl>
Implementations§
Source§impl ComponentDecl
impl ComponentDecl
Sourcepub fn get_runner(&self) -> Option<UseRunnerDecl>
pub fn get_runner(&self) -> Option<UseRunnerDecl>
Returns the runner used by this component, or None
if this is a non-executable component.
Sourcepub fn find_storage_source<'a>(
&'a self,
storage_name: &Name,
) -> Option<&'a StorageDecl>
pub fn find_storage_source<'a>( &'a self, storage_name: &Name, ) -> Option<&'a StorageDecl>
Returns the StorageDecl
corresponding to storage_name
.
Sourcepub fn find_protocol_source<'a>(
&'a self,
protocol_name: &Name,
) -> Option<&'a ProtocolDecl>
pub fn find_protocol_source<'a>( &'a self, protocol_name: &Name, ) -> Option<&'a ProtocolDecl>
Returns the ProtocolDecl
corresponding to protocol_name
.
Sourcepub fn find_directory_source<'a>(
&'a self,
directory_name: &Name,
) -> Option<&'a DirectoryDecl>
pub fn find_directory_source<'a>( &'a self, directory_name: &Name, ) -> Option<&'a DirectoryDecl>
Returns the DirectoryDecl
corresponding to directory_name
.
Sourcepub fn find_runner_source<'a>(
&'a self,
runner_name: &Name,
) -> Option<&'a RunnerDecl>
pub fn find_runner_source<'a>( &'a self, runner_name: &Name, ) -> Option<&'a RunnerDecl>
Returns the RunnerDecl
corresponding to runner_name
.
Sourcepub fn find_resolver_source<'a>(
&'a self,
resolver_name: &Name,
) -> Option<&'a ResolverDecl>
pub fn find_resolver_source<'a>( &'a self, resolver_name: &Name, ) -> Option<&'a ResolverDecl>
Returns the ResolverDecl
corresponding to resolver_name
.
Sourcepub fn find_collection<'a>(
&'a self,
collection_name: &str,
) -> Option<&'a CollectionDecl>
pub fn find_collection<'a>( &'a self, collection_name: &str, ) -> Option<&'a CollectionDecl>
Returns the CollectionDecl
corresponding to collection_name
.
Sourcepub fn is_protocol_exposed_to_framework(&self, in_target_name: &Name) -> bool
pub fn is_protocol_exposed_to_framework(&self, in_target_name: &Name) -> bool
Indicates whether the capability specified by target_name
is exposed to the framework.
Sourcepub fn uses_protocol(&self, source_name: &Name) -> bool
pub fn uses_protocol(&self, source_name: &Name) -> bool
Indicates whether the capability specified by source_name
is requested.
Trait Implementations§
Source§impl Clone for ComponentDecl
impl Clone for ComponentDecl
Source§fn clone(&self) -> ComponentDecl
fn clone(&self) -> ComponentDecl
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ComponentDecl
impl Debug for ComponentDecl
Source§impl Default for ComponentDecl
impl Default for ComponentDecl
Source§fn default() -> ComponentDecl
fn default() -> ComponentDecl
Returns the “default value” for a type. Read more
Source§impl FidlIntoNative<ComponentDecl> for Component
impl FidlIntoNative<ComponentDecl> for Component
fn fidl_into_native(self) -> ComponentDecl
Source§impl From<ComponentDecl> for Component
impl From<ComponentDecl> for Component
Source§fn from(decl: ComponentDecl) -> Self
fn from(decl: ComponentDecl) -> Self
Converts to this type from the input type.
Source§impl NativeIntoFidl<Component> for ComponentDecl
impl NativeIntoFidl<Component> for ComponentDecl
fn native_into_fidl(self) -> Component
Source§impl PartialEq for ComponentDecl
impl PartialEq for ComponentDecl
Source§impl TryFrom<Component> for ComponentDecl
impl TryFrom<Component> for ComponentDecl
Converts the contents of a CM-FIDL declaration and produces the equivalent CM-Rust struct. This function applies cm_fidl_validator to check correctness.
impl StructuralPartialEq for ComponentDecl
Auto Trait Implementations§
impl Freeze for ComponentDecl
impl RefUnwindSafe for ComponentDecl
impl Send for ComponentDecl
impl Sync for ComponentDecl
impl Unpin for ComponentDecl
impl UnwindSafe for ComponentDecl
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)