/// Routes an event and returns its source name and scope on success.
Routes an event and returns its source name and scope on success.
Routes an event and returns its source name and scope on success .
async fn route_event(
        &self,
        event_decl: &UseEventDecl,
        realm: &Arc<Realm>,
    ) -> Result<(CapabilityName, AbsoluteMoniker), ModelError> {
        routing::route_use_event_capability(&UseDecl::Event(event_decl.clone()), &realm).await.map(
            |source| match source {
                CapabilitySource::Framework {
                    capability: FrameworkCapability::Event(source_name),
                    scope_moniker: Some(scope_moniker),
                } => (source_name, scope_moniker),
                _ => unreachable!(),
            },
        )
    }
async fn route_event ( & self , event_decl : & UseEventDecl , realm : & Arc < Realm > , ) -> Result < ( CapabilityName , AbsoluteMoniker ) , ModelError > { routing :: route_use_event_capability ( & UseDecl :: Event ( event_decl . clone ( ) ) , & realm ) . await . map ( | source | match source { CapabilitySource :: Framework { capability : FrameworkCapability :: Event ( source_name ) , scope_moniker : Some ( scope_moniker ) , } => ( source_name , scope_moniker ) , _ => unreachable ! ( ) , } , ) }
Routes an event and returns its source name and scope on success.
Routes an event and returns its source name and scope on success .
&self
event_decl
&UseEventDecl
realm
&Arc<Realm>