pub fn source_name<'a>(&self) -> Option<&CapabilityName> {
        match self {
            ComponentCapability::Expose(ExposeDecl::Runner(ExposeRunnerDecl {
                source_name,
                ..
            })) => Some(source_name),
            ComponentCapability::Offer(OfferDecl::Runner(OfferRunnerDecl {
                source_name, ..
            })) => Some(source_name),
            ComponentCapability::Use(UseDecl::Event(UseEventDecl { source_name, .. })) => {
                Some(source_name)
            }
            ComponentCapability::Offer(OfferDecl::Event(OfferEventDecl {
                source_name, ..
            })) => Some(source_name),
            _ => None,
        }
    }
/// Return the source name of the capability, if one exists.
Return the source name of the capability, if one exists.
Return the source name of the capability if one exists .
pub fn source_name<'a>(&self) -> Option<&CapabilityName> {
        match self {
            ComponentCapability::Expose(ExposeDecl::Runner(ExposeRunnerDecl {
                source_name,
                ..
            })) => Some(source_name),
            ComponentCapability::Offer(OfferDecl::Runner(OfferRunnerDecl {
                source_name, ..
            })) => Some(source_name),
            ComponentCapability::Use(UseDecl::Event(UseEventDecl { source_name, .. })) => {
                Some(source_name)
            }
            ComponentCapability::Offer(OfferDecl::Event(OfferEventDecl {
                source_name, ..
            })) => Some(source_name),
            _ => None,
        }
    }
pub fn source_name < ' a > ( & self ) -> Option < & CapabilityName > { match self { ComponentCapability :: Expose ( ExposeDecl :: Runner ( ExposeRunnerDecl { source_name , .. } ) ) => Some ( source_name ) , ComponentCapability :: Offer ( OfferDecl :: Runner ( OfferRunnerDecl { source_name , .. } ) ) => Some ( source_name ) , ComponentCapability :: Use ( UseDecl :: Event ( UseEventDecl { source_name , .. } ) ) => { Some ( source_name ) } ComponentCapability :: Offer ( OfferDecl :: Event ( OfferEventDecl { source_name , .. } ) ) => Some ( source_name ) , _ => None , } }
Return the source name of the capability, if one exists.
Return the source name of the capability if one exists .
&self
&self