/// Returns whether the given ComponentCapability can be available in a component's namespace.
Returns whether the given ComponentCapability can be available in a component's namespace.
Returns whether the given ComponentCapability can be available in a component ' s namespace .
pub fn can_be_in_namespace(&self) -> bool {
        match self {
            ComponentCapability::Use(use_) => {
                matches!(use_, UseDecl::Protocol(_) | UseDecl::Directory(_) | UseDecl::Service(_))
            }
            ComponentCapability::Expose(expose) => {
                matches!(
                    expose,
                    ExposeDecl::Protocol(_) | ExposeDecl::Directory(_) | ExposeDecl::Service(_)
                )
            }
            ComponentCapability::Offer(offer) => matches!(
                offer,
                OfferDecl::Protocol(_) | OfferDecl::Directory(_) | OfferDecl::Service(_)
            ),
            ComponentCapability::Protocol(_)
            | ComponentCapability::Directory(_)
            | ComponentCapability::Service(_) => true,
            _ => false,
        }
    }
pub fn can_be_in_namespace ( & self ) -> bool { match self { ComponentCapability :: Use ( use_ ) => { matches ! ( use_ UseDecl Protocol ( ) UseDecl Directory ( ) UseDecl Service ( ) ) } ComponentCapability :: Expose ( expose ) => { matches ! ( expose ExposeDecl Protocol ( ) ExposeDecl Directory ( ) ExposeDecl Service ( ) ) } ComponentCapability :: Offer ( offer ) => matches ! ( offer OfferDecl Protocol ( ) OfferDecl Directory ( ) OfferDecl Service ( ) ) , ComponentCapability :: Protocol ( _ ) | ComponentCapability :: Directory ( _ ) | ComponentCapability :: Service ( _ ) => true , _ => false , } }
Returns whether the given ComponentCapability can be available in a component's namespace.
Returns whether the given ComponentCapability can be available in a component ' s namespace .
&self