async fn list<'a>(
        &'a self,
        prefix: Option<&'a str>,
    ) -> InternalResult<impl Stream<Item = InternalResult<Vec<String>>> + 'a> {
        let list = if let Some(prefix) = prefix {
            self.storage
                .read()
                .await
                .keys()
                .filter(|k| k.starts_with(prefix))
                .cloned()
                .collect()
        } else {
            self.storage.read().await.keys().cloned().collect()
        };

        Ok(futures::stream::once(async move { Ok(list) }))
    }
/// List all the objects with the given prefix.
List all the objects with the given prefix.
List all the objects with the given prefix .
async fn list<'a>(
        &'a self,
        prefix: Option<&'a str>,
    ) -> InternalResult<impl Stream<Item = InternalResult<Vec<String>>> + 'a> {
        let list = if let Some(prefix) = prefix {
            self.storage
                .read()
                .await
                .keys()
                .filter(|k| k.starts_with(prefix))
                .cloned()
                .collect()
        } else {
            self.storage.read().await.keys().cloned().collect()
        };
        Ok(futures::stream::once(async move { Ok(list) }))
    }
async fn list < ' a > ( & ' a self , prefix : Option < & ' a str > , ) -> InternalResult < impl Stream < Item = InternalResult < Vec < String > > > + ' a > { let list = if let Some ( prefix ) = prefix { self . storage . read ( ) . await . keys ( ) . filter ( | k | k . starts_with ( prefix ) ) . cloned ( ) . collect ( ) } else { self . storage . read ( ) . await . keys ( ) . cloned ( ) . collect ( ) } ; Ok ( futures :: stream :: once ( async move { Ok ( list ) } ) ) }
List all the objects with the given prefix.
List all the objects with the given prefix .
&'a self
prefix
Option<&'a str>