pub struct S3BucketClient {
pub base_url: String,
pub api_key: String,
pub bucket_name: String,
pub http_client: Client,
pub options: S3Options,
}Expand description
S3バケット操作用クライアント
Fields§
§base_url: String§api_key: String§bucket_name: String§http_client: Client§options: S3OptionsImplementations§
Source§impl S3BucketClient
impl S3BucketClient
Sourcepub fn new(
base_url: &str,
api_key: &str,
bucket_name: &str,
http_client: Client,
options: S3Options,
) -> Self
pub fn new( base_url: &str, api_key: &str, bucket_name: &str, http_client: Client, options: S3Options, ) -> Self
新しいS3バケットクライアントを作成
Sourcepub async fn put_object(
&self,
path: &str,
data: Bytes,
content_type: Option<String>,
metadata: Option<HashMap<String, String>>,
) -> Result<()>
pub async fn put_object( &self, path: &str, data: Bytes, content_type: Option<String>, metadata: Option<HashMap<String, String>>, ) -> Result<()>
オブジェクトをアップロード(S3互換API)
Sourcepub async fn get_object(&self, path: &str) -> Result<Bytes>
pub async fn get_object(&self, path: &str) -> Result<Bytes>
オブジェクトをダウンロード(S3互換API)
Sourcepub async fn head_object(&self, path: &str) -> Result<HashMap<String, String>>
pub async fn head_object(&self, path: &str) -> Result<HashMap<String, String>>
オブジェクトのメタデータを取得(S3互換API)
Sourcepub async fn delete_object(&self, path: &str) -> Result<()>
pub async fn delete_object(&self, path: &str) -> Result<()>
オブジェクトを削除(S3互換API)
Auto Trait Implementations§
impl Freeze for S3BucketClient
impl !RefUnwindSafe for S3BucketClient
impl Send for S3BucketClient
impl Sync for S3BucketClient
impl Unpin for S3BucketClient
impl !UnwindSafe for S3BucketClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more