Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tu6ge committed May 29, 2024
1 parent 3b12cc2 commit 981c82a
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ struct Client {
}

impl Client {
async fn get_buckets(&self, endpoint: EndPoint) -> Vec<Bucket> {
async fn get_buckets(&self, endpoint: EndPoint) -> Vec<Bucket> {
todo!()
}
}

// 导出到自定义的类型
pub async fn export_buckets<B: DeserializeOwned>(
&self,
endpoint: &EndPoint,
) -> Result<Vec<B>, OssError> {
//...
}
}
```

Expand All @@ -32,9 +40,24 @@ impl Bucket{
async fn get_info(&self, client: &Client) -> BucketInfo {
todo!()
}

// 导出到自定义的类型
pub async fn export_info<B: DeserializeOwned>(&self, client: &Client) -> Result<B, OssError> {
//...
}

async fn get_object(&self, client: &Client) -> Vec<Object> {
todo!()
}

// 导出到自定义的类型
pub async fn export_objects<Obj: DeserializeOwned>(
&self,
query: &ObjectQuery,
client: &Client,
) -> Result<(Vec<Obj>, NextContinuationToken), OssError> {
//...
}
}
```
get object info
Expand Down

0 comments on commit 981c82a

Please sign in to comment.