erickguan commented on code in PR #7815:
URL: https://github.com/apache/opendal/pull/7815#discussion_r3487865811
##########
core/core/src/types/operator/operator_futures.rs:
##########
@@ -1538,3 +1538,32 @@ impl<F: Future<Output = Result<Copier>>> FutureCopier<F>
{
self
}
}
+
+/// Future that generated by [`Operator::rename_with`].
+///
+/// Users can add more options by public functions provided by this struct.
+pub type FutureRename<F> = OperatorFuture<(options::RenameOptions, String),
(), F>;
+
+impl<F: Future<Output = Result<()>>> FutureRename<F> {
+ /// Sets the condition that rename operation will succeed only if target
does not exist.
+ ///
+ /// Refer to [`options::RenameOptions::if_not_exists`] for more details.
+ ///
+ /// ### Example
+ ///
+ /// ```
+ /// use opendal_core::Operator;
+ /// use opendal_core::Result;
+ ///
+ /// async fn test(op: Operator) -> Result<()> {
Review Comment:
```suggestion
/// async fn rename_with_options(op: Operator) -> Result<()> {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]