StorageBucketClient

Struct StorageBucketClient 

Source
pub struct StorageBucketClient<'a> { /* private fields */ }
Expand description

ストレージバケットクライアント

Implementations§

Source§

impl<'a> StorageBucketClient<'a>

Source

pub async fn upload( &self, path: &str, file_path: &Path, options: Option<FileOptions>, ) -> Result<FileObject>

ファイルをアップロード

Source

pub async fn download(&self, path: &str) -> Result<Bytes>

ファイルをダウンロード

Source

pub async fn list( &self, prefix: &str, options: Option<ListOptions>, ) -> Result<Vec<FileObject>>

ファイル一覧を取得

Source

pub async fn remove(&self, paths: Vec<&str>) -> Result<()>

ファイルを削除

Source

pub fn get_public_url(&self, path: &str) -> String

公開URLを取得

Source

pub async fn create_signed_url( &self, path: &str, expires_in: i32, ) -> Result<String>

署名付きURLを作成

Source

pub async fn initiate_multipart_upload( &self, path: &str, options: Option<FileOptions>, ) -> Result<InitiateMultipartUploadResponse>

マルチパートアップロードを初期化

Source

pub async fn upload_part( &self, upload_id: &str, part_number: u32, data: Bytes, ) -> Result<UploadedPartInfo>

チャンクをアップロード

Source

pub async fn complete_multipart_upload( &self, upload_id: &str, path: &str, parts: Vec<UploadedPartInfo>, ) -> Result<FileObject>

マルチパートアップロードを完了

Source

pub async fn abort_multipart_upload( &self, upload_id: &str, path: &str, ) -> Result<()>

マルチパートアップロードを中止

Source

pub async fn upload_large_file( &self, path: &str, file_path: &Path, chunk_size: usize, options: Option<FileOptions>, ) -> Result<FileObject>

大容量ファイルをチャンクでアップロード

このメソッドは大きなファイルを自動的にチャンクに分割してアップロードします。 各チャンクは非同期でアップロードされ、すべてのチャンクがアップロードされると 自動的にマルチパートアップロードを完了します。

Source

pub async fn transform_image( &self, path: &str, options: ImageTransformOptions, ) -> Result<Bytes>

画像に変換を適用して取得する

Source

pub fn get_public_transform_url( &self, path: &str, options: ImageTransformOptions, ) -> String

画像の公開変換URLを取得

Source

pub async fn create_signed_transform_url( &self, path: &str, options: ImageTransformOptions, expires_in: i32, ) -> Result<String>

画像の署名付き変換URLを作成

Source

pub fn s3_compatible(&self, options: S3Options) -> S3BucketClient

S3互換クライアントを作成

Source

pub async fn move_object( &self, source_path: &str, destination_path: &str, ) -> Result<()>

オブジェクトをバケット内で移動または名前変更します。

§引数
  • source_path - 移動元のオブジェクトのパス。
  • destination_path - 移動先のオブジェクトのパス。
§戻り値

移動が成功した場合は Ok(())、失敗した場合は StorageError を返します。

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T