[![Crates.io](https://img.shields.io/crates/v/tencent-qcloud-cos-rs?style=flat-square)](https://crates.io/crates/tencent-qcloud-cos-rs) [![qcos](https://github.com/simman/tencent-qcloud-cos-rs/actions/workflows/qcos.yml/badge.svg?branch=master)](https://github.com/simman/tencent-qcloud-cos-rs/actions/workflows/qcos.yml) **异æ¥ç‰ˆæœ¬** `async`/`await` 本包æ供腾讯云对象å˜å‚¨(cos) 基本的æ“作,包括`bucket`创建åŠåˆ é™¤ï¼Œå¯¹è±¡çš„ä¸Šä¼ (支æŒåˆ†å—ä¼ è¾“)ã€ä¸‹è½½ã€åˆ 除ç‰ã€‚åŽç»æœ‰æ—¶é—´ä¼šè¡¥å……其他接å£çš„实现。 # How to use ```rust use tencent_qcloud_cos_rs::acl::{AclHeader, ObjectAcl}; use tencent_qcloud_cos_rs::client::Client; use tencent_qcloud_cos_rs::objects::{mime, ErrNo, Objects}; #[tokio::main] async fn main() { let client = Client::new( "Your secrect id", "Your secrect key", Some(String::from("Your security token")), // or None "bucket name", "region", ); let mut acl_header = AclHeader::new(); acl_header.insert_object_x_cos_acl(ObjectAcl::PublicRead); let res = client.put_object("test.png", "test.png", mime::IMAGE_PNG, Some(&acl_header)).await; if res.error_no == ErrNo::SUCCESS { println!("success"); } else { println!("{}", res.error_message); } } ``` 如果æ“作æˆåŠŸï¼Œä¼šæ‰“å°å‡º`success`, å¦åˆ™ä¼šæ‰“å°å‡ºå¤±è´¥åŽŸå› 。 更多的例å请å‚考[examples](https://github.com/simman/tencent-qcloud-cos-rs/tree/master/examples)。 # Installation insert into your project's cargo.toml block next line ``` [dependencies] tencent-qcloud-cos-rs = "0.1.0" ``` # Other fork base: [https://github.com/bujnlc8/qcos](https://github.com/bujnlc8/qcos)