pub async fn into_instance(
        self,
        resource_manager: Arc<ResourceManager>,
    ) -> Result<Box<dyn TriggerConfigLoader + Send>> {
        let r: Box<dyn TriggerConfigLoader + Send> = match self {
            ConfigReaderConfiguration::File { file } => {
                Box::from(FileTriggerConfigLoader::new(file)?)
            }
            ConfigReaderConfiguration::DataStore {
                project_id,
                credentials_file_path,
            } => Box::from(
                DatastoreTriggerConfigLoader::from_credentials(project_id, credentials_file_path)
                    .await?,
            ),
            ConfigReaderConfiguration::Embedded { directory } => Box::from(
                EmbeddedTriggerConfigLoader::new(resource_manager.get_embedded_store(&directory)?)?,
            ),
        };

        Ok(r)
    }
/// Returns a usable trigger config loader from the configuration struct.
Returns a usable trigger config loader from the configuration struct.
Returns a usable trigger config loader from the configuration struct .
pub async fn into_instance(
        self,
        resource_manager: Arc<ResourceManager>,
    ) -> Result<Box<dyn TriggerConfigLoader + Send>> {
        let r: Box<dyn TriggerConfigLoader + Send> = match self {
            ConfigReaderConfiguration::File { file } => {
                Box::from(FileTriggerConfigLoader::new(file)?)
            }
            ConfigReaderConfiguration::DataStore {
                project_id,
                credentials_file_path,
            } => Box::from(
                DatastoreTriggerConfigLoader::from_credentials(project_id, credentials_file_path)
                    .await?,
            ),
            ConfigReaderConfiguration::Embedded { directory } => Box::from(
                EmbeddedTriggerConfigLoader::new(resource_manager.get_embedded_store(&directory)?)?,
            ),
        };
        Ok(r)
    }
pub async fn into_instance ( self , resource_manager : Arc < ResourceManager > , ) -> Result < Box < dyn TriggerConfigLoader + Send > > { let r : Box < dyn TriggerConfigLoader + Send > = match self { ConfigReaderConfiguration :: File { file } => { Box :: from ( FileTriggerConfigLoader :: new ( file ) ? ) } ConfigReaderConfiguration :: DataStore { project_id , credentials_file_path , } => Box :: from ( DatastoreTriggerConfigLoader :: from_credentials ( project_id , credentials_file_path ) . await ? , ) , ConfigReaderConfiguration :: Embedded { directory } => Box :: from ( EmbeddedTriggerConfigLoader :: new ( resource_manager . get_embedded_store ( & directory ) ? ) ? , ) , } ; Ok ( r ) }
Returns a usable trigger config loader from the configuration struct.
Returns a usable trigger config loader from the configuration struct .
self
resource_manager
Arc<ResourceManager>