pub struct GetObject<'a> { /* private fields */ }Implementations§
Source§impl GetObject<'_>
impl GetObject<'_>
Sourcepub async fn receive_bytes(
&self,
object_name: &str,
) -> Result<(Bytes, GetObjectResponseHeader, HeaderMap), Error>
pub async fn receive_bytes( &self, object_name: &str, ) -> Result<(Bytes, GetObjectResponseHeader, HeaderMap), Error>
返回:
Vec<u8>:文件数据HashMap<String, String>:所有响应头
pub async fn receive_bytes_stream( &self, object_name: &str, ) -> Result<(impl Stream<Item = Result<Bytes, Error>> + use<>, GetObjectResponseHeader, HeaderMap), Error>
pub async fn download_to_file( &self, object_name: &str, file_path: &Path, ) -> Result<(GetObjectResponseHeader, HeaderMap), Error>
Auto Trait Implementations§
impl<'a> Freeze for GetObject<'a>
impl<'a> !RefUnwindSafe for GetObject<'a>
impl<'a> Send for GetObject<'a>
impl<'a> Sync for GetObject<'a>
impl<'a> Unpin for GetObject<'a>
impl<'a> UnsafeUnpin for GetObject<'a>
impl<'a> !UnwindSafe for GetObject<'a>
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