fn offer_source_exists(&self, source: &OfferSource) -> bool {
        match source {
            OfferSource::Framework | OfferSource::Self_ | OfferSource::Parent => true,
            OfferSource::Child(cm_rust::ChildRef { name, collection }) => {
                self.get_live_child(&ChildMoniker::new(name.clone(), collection.clone())).is_some()
            }
            OfferSource::Collection(collection_name) => {
                self.collections().into_iter().any(|collection| collection.name == *collection_name)
            }
            OfferSource::Capability(capability_name) => self
                .capabilities()
                .into_iter()
                .any(|capability| capability.name() == capability_name),
        }
    }
/// Returns true if the given offer source refers to a valid entity, e.g., a
/// child that exists, a declared collection, etc.
Returns true if the given offer source refers to a valid entity, e.g., a
child that exists, a declared collection, etc.
Returns true if the given offer source refers to a valid entity e . g . a child that exists a declared collection etc .
fn offer_source_exists(&self, source: &OfferSource) -> bool {
        match source {
            OfferSource::Framework | OfferSource::Self_ | OfferSource::Parent => true,
            OfferSource::Child(cm_rust::ChildRef { name, collection }) => {
                self.get_live_child(&ChildMoniker::new(name.clone(), collection.clone())).is_some()
            }
            OfferSource::Collection(collection_name) => {
                self.collections().into_iter().any(|collection| collection.name == *collection_name)
            }
            OfferSource::Capability(capability_name) => self
                .capabilities()
                .into_iter()
                .any(|capability| capability.name() == capability_name),
        }
    }
fn offer_source_exists ( & self , source : & OfferSource ) -> bool { match source { OfferSource :: Framework | OfferSource :: Self_ | OfferSource :: Parent => true , OfferSource :: Child ( cm_rust :: ChildRef { name , collection } ) => { self . get_live_child ( & ChildMoniker :: new ( name . clone ( ) , collection . clone ( ) ) ) . is_some ( ) } OfferSource :: Collection ( collection_name ) => { self . collections ( ) . into_iter ( ) . any ( | collection | collection . name == * collection_name ) } OfferSource :: Capability ( capability_name ) => self . capabilities ( ) . into_iter ( ) . any ( | capability | capability . name ( ) == capability_name ) , } }
Returns true if the given offer source refers to a valid entity, e.g., a
child that exists, a declared collection, etc.
Returns true if the given offer source refers to a valid entity e . g . a child that exists a declared collection etc .
&self
source
&OfferSource
&self
source
&OfferSource