You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "j178 (via GitHub)" <gi...@apache.org> on 2023/05/24 13:39:32 UTC
[GitHub] [incubator-opendal] j178 opened a new pull request, #2308: refactor(core): Implement RFC-2299 for read_with
j178 opened a new pull request, #2308:
URL: https://github.com/apache/incubator-opendal/pull/2308
Updates #2300
Breaking: `read_range_with` has been removed.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #2308: refactor(core): Implement RFC-2299 for read_with
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #2308:
URL: https://github.com/apache/incubator-opendal/pull/2308#discussion_r1204178154
##########
core/src/types/operator/operator_futures.rs:
##########
@@ -172,3 +172,52 @@ impl Future for FutureAppender {
self.0.poll_unpin(cx)
}
}
+
+/// Future that generated by [`Operator::read_with`].
+///
+/// Users can add more options by public functions provided by this struct.
+pub struct FutureRead(pub(crate) OperatorFuture<OpRead, Vec<u8>>);
+
+impl FutureRead {
+ /// Set the range header for this operation.
+ pub fn range(mut self, range: BytesRange) -> Self {
Review Comment:
We should not expose `BytesRange` to users directly. Please use `range: impl RangeBounds<u64>` and convert to `BytesRange` internally.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] j178 commented on a diff in pull request #2308: refactor(core): Implement RFC-2299 for read_with
Posted by "j178 (via GitHub)" <gi...@apache.org>.
j178 commented on code in PR #2308:
URL: https://github.com/apache/incubator-opendal/pull/2308#discussion_r1204199730
##########
core/src/types/operator/operator_futures.rs:
##########
@@ -172,3 +172,52 @@ impl Future for FutureAppender {
self.0.poll_unpin(cx)
}
}
+
+/// Future that generated by [`Operator::read_with`].
+///
+/// Users can add more options by public functions provided by this struct.
+pub struct FutureRead(pub(crate) OperatorFuture<OpRead, Vec<u8>>);
+
+impl FutureRead {
+ /// Set the range header for this operation.
+ pub fn range(mut self, range: BytesRange) -> Self {
Review Comment:
Thanks, fixed.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-opendal] suyanhanx merged pull request #2308: refactor(core): Implement RFC-2299 for read_with
Posted by "suyanhanx (via GitHub)" <gi...@apache.org>.
suyanhanx merged PR #2308:
URL: https://github.com/apache/incubator-opendal/pull/2308
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org