Adds streaming generation that returns a streaming
- Introducues generate_content_stream that returns a Tokio Steam instead of a Queue. This allows using the standard stream APIs from tokio-streams. - Replace future-utils with tokio-streams, mainly due to better ergonomics for using the filter_map stream combinator.
This commit is contained in:
@@ -7,7 +7,7 @@ pub trait TokenProvider {
|
||||
-> impl std::future::Future<Output = Result<String>> + Send;
|
||||
}
|
||||
|
||||
impl<'a> TokenProvider for Arc<dyn gcp_auth::TokenProvider + 'a> {
|
||||
impl TokenProvider for Arc<dyn gcp_auth::TokenProvider> {
|
||||
async fn get_token(&self, scope: &[&str]) -> Result<String> {
|
||||
let token = self.token(scope).await;
|
||||
match token {
|
||||
|
||||
Reference in New Issue
Block a user