-
Notifications
You must be signed in to change notification settings - Fork 596
refactor(core): Deprecate OpList::version and add versions instead #5481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
d67cead
6be969c
08deaf4
eb451db
b6a8ef0
cd886b5
76794d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,7 +175,10 @@ pub struct Capability { | |
/// Indicates if recursive listing is supported. | ||
pub list_with_recursive: bool, | ||
/// Indicates if versioned listing is supported. | ||
#[deprecated(since = "0.51.1", note = "use with_versioned instead")] | ||
pub list_with_version: bool, | ||
/// Indicates if versioned listing is supported. | ||
pub list_with_versioned: bool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capability is part of opendal's public API so we can't simplely change it. Please add a new field and deprecate the old one. |
||
/// Indicates whether cache control information is available in list response | ||
pub list_has_cache_control: bool, | ||
/// Indicates whether content disposition information is available in list response | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -486,8 +486,20 @@ impl<F: Future<Output = Result<Vec<Entry>>>> FutureList<F> { | |
/// by the underlying service | ||
/// | ||
/// Default to `false` | ||
#[deprecated(since = "0.51.1", note = "use versioned instead")] | ||
pub fn version(self, v: bool) -> Self { | ||
self.map(|args| args.with_version(v)) | ||
self.map(|args| args.with_versioned(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_versioned(v)) | ||
} | ||
} | ||
|
||
|
@@ -528,7 +540,19 @@ impl<F: Future<Output = Result<Lister>>> FutureLister<F> { | |
/// by the underlying service | ||
/// | ||
/// Default to `false` | ||
#[deprecated(since = "0.51.1", note = "use versioned instead")] | ||
pub fn version(self, v: bool) -> Self { | ||
self.map(|args| args.with_version(v)) | ||
self.map(|args| args.with_versioned(v)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a |
||
} | ||
|
||
/// 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_versioned(v)) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with_version
should be replaced bywith_versioned
.