/// Returns all objects matching the [`ObjectId`] at the source.
///
/// Some sources, namely all the symbol servers, simply return the locations at which a
/// download attempt should be made without any guarantee the object is actually there.
///
/// If the source needs to be contacted to get matching objects this may fail and
/// returns a [`DownloadError`].
///
/// Note that the `filetypes` argument is not more then a hint, not all source types
/// will respect this and they may return all DIFs matching the `object_id`.  After
/// downloading you may still need to filter the files.
Returns all objects matching the [`ObjectId`] at the source.
Some sources, namely all the symbol servers, simply return the locations at which a
download attempt should be made without any guarantee the object is actually there.

If the source needs to be contacted to get matching objects this may fail and
returns a [`DownloadError`].

Note that the `filetypes` argument is not more then a hint, not all source types
will respect this and they may return all DIFs matching the `object_id`.  After
downloading you may still need to filter the files.
Returns all objects matching the [ ` ObjectId ` ] at the source . Some sources namely all the symbol servers simply return the locations at which a download attempt should be made without any guarantee the object is actually there . If the source needs to be contacted to get matching objects this may fail and returns a [ ` DownloadError ` ] . Note that the ` filetypes ` argument is not more then a hint not all source types will respect this and they may return all DIFs matching the ` object_id ` . After downloading you may still need to filter the files .
pub async fn list_files(
        &self,
        source: SourceConfig,
        filetypes: &[FileType],
        object_id: ObjectId,
    ) -> Result<Vec<RemoteDif>, DownloadError> {
        match source {
            SourceConfig::Sentry(cfg) => {
                let job = self
                    .sentry
                    .list_files(cfg, object_id, filetypes, &self.config);
                let job = tokio::time::timeout(Duration::from_secs(30), job);
                let job = measure("service.download.list_files", m::timed_result, None, job);
                job.await.map_err(|_| DownloadError::Canceled)?
            }
            SourceConfig::Http(cfg) => Ok(self.http.list_files(cfg, filetypes, object_id)),
            SourceConfig::S3(cfg) => Ok(self.s3.list_files(cfg, filetypes, object_id)),
            SourceConfig::Gcs(cfg) => Ok(self.gcs.list_files(cfg, filetypes, object_id)),
            SourceConfig::Filesystem(cfg) => Ok(self.fs.list_files(cfg, filetypes, object_id)),
        }
    }
pub async fn list_files ( & self , source : SourceConfig , filetypes : & [ FileType ] , object_id : ObjectId , ) -> Result < Vec < RemoteDif > , DownloadError > { match source { SourceConfig :: Sentry ( cfg ) => { let job = self . sentry . list_files ( cfg , object_id , filetypes , & self . config ) ; let job = tokio :: time :: timeout ( Duration :: from_secs ( 30 ) , job ) ; let job = measure ( " " , m :: timed_result , None , job ) ; job . await . map_err ( | _ | DownloadError :: Canceled ) ? } SourceConfig :: Http ( cfg ) => Ok ( self . http . list_files ( cfg , filetypes , object_id ) ) , SourceConfig :: S3 ( cfg ) => Ok ( self . s3 . list_files ( cfg , filetypes , object_id ) ) , SourceConfig :: Gcs ( cfg ) => Ok ( self . gcs . list_files ( cfg , filetypes , object_id ) ) , SourceConfig :: Filesystem ( cfg ) => Ok ( self . fs . list_files ( cfg , filetypes , object_id ) ) , } }
Returns all objects matching the [`ObjectId`] at the source.
Returns all objects matching the [ ` ObjectId ` ] at the source .
&self
source
SourceConfig
filetypes
&[FileType]
object_id
ObjectId