Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorgan committed Sep 9, 2024
1 parent 90b3895 commit 2c2249e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion core/src/raw/oio/list/page_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub trait PageList: Send + Sync + Unpin + 'static {
///
/// - Set `done` to `true` if all page have been fetched.
/// - Update `token` if there is more page to fetch. `token` is not exposed to users, it's internal used only.
/// - Update `key_marker` and `version_id_marker` if object version is enabled and there are more page to fetch.
/// - Update `key_marker` and `version_id_marker` if object versioning is enabled and there are more page to fetch.
/// similar to `token`, they should only be internal used
/// - Push back into the entries for each entry fetched from underlying storage.
///
Expand Down
19 changes: 10 additions & 9 deletions core/src/raw/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ pub struct OpList {
/// 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 the underlying service is supported
/// - If `true`, list operation will return with object versions if object versioning is supported
/// by the underlying service
///
/// Default to `false`
version: bool,
Expand Down Expand Up @@ -351,36 +352,36 @@ impl OpRead {
&mut self.range
}

/// Sets the content-disposition header that should be send back by the remote read operation.
/// Sets the content-disposition header that should be sent back by the remote read operation.
pub fn with_override_content_disposition(mut self, content_disposition: &str) -> Self {
self.override_content_disposition = Some(content_disposition.into());
self
}

/// Returns the content-disposition header that should be send back by the remote read
/// Returns the content-disposition header that should be sent back by the remote read
/// operation.
pub fn override_content_disposition(&self) -> Option<&str> {
self.override_content_disposition.as_deref()
}

/// Sets the cache-control header that should be send back by the remote read operation.
/// Sets the cache-control header that should be sent back by the remote read operation.
pub fn with_override_cache_control(mut self, cache_control: &str) -> Self {
self.override_cache_control = Some(cache_control.into());
self
}

/// Returns the cache-control header that should be send back by the remote read operation.
/// Returns the cache-control header that should be sent back by the remote read operation.
pub fn override_cache_control(&self) -> Option<&str> {
self.override_cache_control.as_deref()
}

/// Sets the content-type header that should be send back by the remote read operation.
/// Sets the content-type header that should be sent back by the remote read operation.
pub fn with_override_content_type(mut self, content_type: &str) -> Self {
self.override_content_type = Some(content_type.into());
self
}

/// Returns the content-type header that should be send back by the remote read operation.
/// Returns the content-type header that should be sent back by the remote read operation.
pub fn override_content_type(&self) -> Option<&str> {
self.override_content_type.as_deref()
}
Expand Down Expand Up @@ -544,13 +545,13 @@ impl OpStat {
self.if_none_match.as_deref()
}

/// Sets the content-disposition header that should be send back by the remote read operation.
/// Sets the content-disposition header that should be sent back by the remote read operation.
pub fn with_override_content_disposition(mut self, content_disposition: &str) -> Self {
self.override_content_disposition = Some(content_disposition.into());
self
}

/// Returns the content-disposition header that should be send back by the remote read
/// Returns the content-disposition header that should be sent back by the remote read
/// operation.
pub fn override_content_disposition(&self) -> Option<&str> {
self.override_content_disposition.as_deref()
Expand Down
14 changes: 8 additions & 6 deletions core/src/types/operator/operator_futures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,11 @@ impl<F: Future<Output = Result<Vec<Entry>>>> FutureList<F> {
self.map(|args| args.with_concurrent(v))
}

/// Version is used to control whether the version should be returned
/// The version is used to control whether the object versions should be returned.
///
/// If `false`, list operation will not return with version
/// If `true`, list operation will return with version if the underlying service is supported
/// - 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 version(self, v: bool) -> Self {
Expand Down Expand Up @@ -538,10 +539,11 @@ impl<F: Future<Output = Result<Lister>>> FutureLister<F> {
self.map(|args| args.with_concurrent(v))
}

/// Version is used to control whether the version should be returned
/// The version is used to control whether the object versions should be returned.
///
/// If `false`, list operation will not return with version
/// If `true`, list operation will return with version if the underlying service is supported
/// - 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 version(self, v: bool) -> Self {
Expand Down

0 comments on commit 2c2249e

Please sign in to comment.