Skip to content

Commit 6d547a6

Browse files
authored
chore: Minor docs updates (#216)
Includes minor clarifications on some doc comments.
1 parent 96c9f32 commit 6d547a6

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

clients/rust/src/delete.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ impl Session {
1313
}
1414
}
1515

16-
/// A DELETE request builder.
16+
/// A [`delete`](Session::delete) request builder.
1717
#[derive(Debug)]
1818
pub struct DeleteBuilder {
1919
session: Session,
2020
key: String,
2121
}
2222

2323
impl DeleteBuilder {
24-
/// Sends the `DELETE` request.
24+
/// Sends the delete request.
2525
pub async fn send(self) -> crate::Result<DeleteResponse> {
2626
self.session
2727
.request(reqwest::Method::DELETE, &self.key)

clients/rust/src/get.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl fmt::Debug for GetResponse {
4545
}
4646

4747
impl Session {
48-
/// Requests the object with the given `key`.
48+
/// Retrieves the object with the given `key`.
4949
pub fn get(&self, key: &str) -> GetBuilder {
5050
GetBuilder {
5151
session: self.clone(),
@@ -55,7 +55,7 @@ impl Session {
5555
}
5656
}
5757

58-
/// A GET request builder.
58+
/// A [`get`](Session::get) request builder.
5959
#[derive(Debug)]
6060
pub struct GetBuilder {
6161
session: Session,
@@ -73,7 +73,7 @@ impl GetBuilder {
7373
self
7474
}
7575

76-
/// Sends the `GET` request.
76+
/// Sends the get request.
7777
pub async fn send(self) -> crate::Result<Option<GetResponse>> {
7878
let response = self
7979
.session

clients/rust/src/put.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ impl Session {
4949
}
5050
}
5151

52-
/// Creates a PUT request for a [`Bytes`]-like type.
52+
/// Creates or replaces an object using a [`Bytes`]-like payload.
5353
pub fn put(&self, body: impl Into<Bytes>) -> PutBuilder {
5454
self.put_body(PutBody::Buffer(body.into()))
5555
}
5656

57-
/// Creates a PUT request with a stream.
57+
/// Creates or replaces an object using a streaming payload.
5858
pub fn put_stream(&self, body: ClientStream) -> PutBuilder {
5959
self.put_body(PutBody::Stream(body))
6060
}
6161

62-
/// Creates a PUT request with an [`AsyncRead`] type.
62+
/// Creates or replaces an object using an [`AsyncRead`] payload.
6363
pub fn put_read<R>(&self, body: R) -> PutBuilder
6464
where
6565
R: AsyncRead + Send + Sync + 'static,
@@ -69,7 +69,7 @@ impl Session {
6969
}
7070
}
7171

72-
/// A PUT request builder.
72+
/// A [`put`](Session::put) request builder.
7373
#[derive(Debug)]
7474
pub struct PutBuilder {
7575
session: Session,
@@ -136,7 +136,7 @@ impl PutBuilder {
136136
// However, `IntoFuture` needs to define the resulting future as an associated type,
137137
// and "impl trait in associated type position" is not yet stable :-(
138138
impl PutBuilder {
139-
/// Sends the built PUT request to the upstream service.
139+
/// Sends the built put request to the upstream service.
140140
pub async fn send(self) -> crate::Result<PutResponse> {
141141
let method = match self.key {
142142
Some(_) => reqwest::Method::PUT,

objectstore-types/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ pub struct Metadata {
199199

200200
/// The creation/last replacement time of the object, if known.
201201
///
202-
/// This is populated by the server when performing a POST or PUT request, i.e. when an object is
203-
/// first created or when an existing object is overwritten.
202+
/// This is set by the server every time an object is put, i.e. when objects are first created
203+
/// and when existing objects are overwritten.
204204
#[serde(skip_serializing_if = "Option::is_none")]
205205
pub time_created: Option<SystemTime>,
206206

0 commit comments

Comments
 (0)