Skip to content

Commit

Permalink
feat(compute): add all function to DetailedServerQuery
Browse files Browse the repository at this point in the history
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
  • Loading branch information
gierens committed Feb 27, 2024
1 parent 19417ca commit 6b61426
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/compute/servers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,14 @@ impl DetailedServerQuery {
debug!("Fetching server details with {:?}", self.inner.query);
ResourceIterator::new(self).into_stream()
}

/// Execute this request and return all results.
///
/// A convenience shortcut for `self.into_stream().try_collect().await`.
#[inline]
pub async fn all(self) -> Result<Vec<Server>> {
self.into_stream().try_collect().await
}
}

#[async_trait]
Expand Down

0 comments on commit 6b61426

Please sign in to comment.