pub trait ObjectTrait {
// Required methods
fn put_object<'life0, 'life1, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
object: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>
where S: 'async_trait + AsRef<str> + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn copy_object<'life0, 'async_trait, S1, S2, S3>(
&'life0 self,
bucket: S1,
src: S2,
dest: S3,
) -> Pin<Box<dyn Future<Output = Result<CopyObjectResult, ObsError>> + Send + 'async_trait>>
where S1: AsRef<str> + Send + 'async_trait,
S2: AsRef<str> + Send + 'async_trait,
S3: AsRef<str> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn delete_object<'life0, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>
where S: 'async_trait + AsRef<str> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn delete_objects<'life0, 'async_trait, S, K>(
&'life0 self,
bucket: S,
keys: K,
response_mode: ResponseMode,
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>
where S: 'async_trait + AsRef<str> + Send,
K: 'async_trait + IntoIterator<Item = S> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn get_object<'life0, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObsError>> + Send + 'async_trait>>
where S: 'async_trait + AsRef<str> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn get_object_metadata<'life0, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, ObsError>> + Send + 'async_trait>>
where S: 'async_trait + AsRef<str> + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn append_object<'life0, 'life1, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
appended: &'life1 [u8],
position: u64,
) -> Pin<Box<dyn Future<Output = Result<NextPosition, ObsError>> + Send + 'async_trait>>
where S: 'async_trait + AsRef<str> + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Methods§
Sourcefn put_object<'life0, 'life1, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
object: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>
fn put_object<'life0, 'life1, 'async_trait, S>( &'life0 self, bucket: S, key: S, object: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>
PUT上传
Sourcefn copy_object<'life0, 'async_trait, S1, S2, S3>(
&'life0 self,
bucket: S1,
src: S2,
dest: S3,
) -> Pin<Box<dyn Future<Output = Result<CopyObjectResult, ObsError>> + Send + 'async_trait>>
fn copy_object<'life0, 'async_trait, S1, S2, S3>( &'life0 self, bucket: S1, src: S2, dest: S3, ) -> Pin<Box<dyn Future<Output = Result<CopyObjectResult, ObsError>> + Send + 'async_trait>>
复制对象
Sourcefn delete_object<'life0, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>
fn delete_object<'life0, 'async_trait, S>( &'life0 self, bucket: S, key: S, ) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>
删除对象
Sourcefn delete_objects<'life0, 'async_trait, S, K>(
&'life0 self,
bucket: S,
keys: K,
response_mode: ResponseMode,
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send,
K: 'async_trait + IntoIterator<Item = S> + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn delete_objects<'life0, 'async_trait, S, K>(
&'life0 self,
bucket: S,
keys: K,
response_mode: ResponseMode,
) -> Pin<Box<dyn Future<Output = Result<(), ObsError>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send,
K: 'async_trait + IntoIterator<Item = S> + Send,
Self: 'async_trait,
'life0: 'async_trait,
批量删除对象
Sourcefn get_object<'life0, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObsError>> + Send + 'async_trait>>
fn get_object<'life0, 'async_trait, S>( &'life0 self, bucket: S, key: S, ) -> Pin<Box<dyn Future<Output = Result<Bytes, ObsError>> + Send + 'async_trait>>
获取对象内容
Sourcefn get_object_metadata<'life0, 'async_trait, S>(
&'life0 self,
bucket: S,
key: S,
) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, ObsError>> + Send + 'async_trait>>
fn get_object_metadata<'life0, 'async_trait, S>( &'life0 self, bucket: S, key: S, ) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, ObsError>> + Send + 'async_trait>>
获取对象元数据
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.