From d67ceadb5ce2a5fa462fabb16bd3ab47e310b007 Mon Sep 17 00:00:00 2001 From: geetanshjuneja Date: Mon, 30 Dec 2024 15:39:58 +0000 Subject: [PATCH] Deprecate version and add versioned --- core/src/types/operator/operator_futures.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/src/types/operator/operator_futures.rs b/core/src/types/operator/operator_futures.rs index 2d119055794f..b9663dd3f101 100644 --- a/core/src/types/operator/operator_futures.rs +++ b/core/src/types/operator/operator_futures.rs @@ -486,9 +486,21 @@ impl>>> FutureList { /// by the underlying service /// /// Default to `false` + #[deprecated = "use versioned instead"] pub fn version(self, v: bool) -> Self { self.map(|args| args.with_version(v)) } + + /// The version is used to control whether the object versions should be returned. + /// + /// - If `false`, list operation will not return with object versions + /// - If `true`, list operation will return with object versions if object versioning is supported + /// by the underlying service + /// + /// Default to `false` + pub fn versioned(self, v: bool) -> Self { + self.map(|args| args.with_version(v)) + } } /// Future that generated by [`Operator::list_with`] or [`Operator::lister_with`].