Struct s3compat::bucket::Bucket [−][src]
pub struct Bucket { pub name: String, pub region: Region, pub credentials: Credentials, pub extra_headers: HeaderMap, pub extra_query: Query, // some fields omitted }
Fields
name: String
region: Region
credentials: Credentials
extra_headers: HeaderMap
extra_query: Query
Implementations
impl Bucket
[src]
impl Bucket
[src]pub fn presign_get<S: AsRef<str>>(
&self,
path: S,
expiry_secs: u32
) -> Result<String>
[src]
&self,
path: S,
expiry_secs: u32
) -> Result<String>
pub fn presign_put<S: AsRef<str>>(
&self,
path: S,
expiry_secs: u32,
custom_headers: Option<HeaderMap>
) -> Result<String>
[src]
&self,
path: S,
expiry_secs: u32,
custom_headers: Option<HeaderMap>
) -> Result<String>
pub async fn create(
name: &str,
region: Region,
credentials: Credentials,
config: BucketConfiguration
) -> Result<CreateBucketResponse>
[src]
name: &str,
region: Region,
credentials: Credentials,
config: BucketConfiguration
) -> Result<CreateBucketResponse>
pub async fn create_with_path_style(
name: &str,
region: Region,
credentials: Credentials,
config: BucketConfiguration
) -> Result<CreateBucketResponse>
[src]
name: &str,
region: Region,
credentials: Credentials,
config: BucketConfiguration
) -> Result<CreateBucketResponse>
pub async fn delete(&self) -> Result<u16>
[src]
pub fn new(
name: &str,
region: Region,
credentials: Credentials
) -> Result<Bucket>
[src]
name: &str,
region: Region,
credentials: Credentials
) -> Result<Bucket>
pub fn new_public(name: &str, region: Region) -> Result<Bucket>
[src]
pub fn new_with_path_style(
name: &str,
region: Region,
credentials: Credentials
) -> Result<Bucket>
[src]
name: &str,
region: Region,
credentials: Credentials
) -> Result<Bucket>
pub fn new_public_with_path_style(name: &str, region: Region) -> Result<Bucket>
[src]
pub async fn get_object<S: AsRef<str>>(&self, path: S) -> Result<(Vec<u8>, u16)>
[src]
pub async fn get_object_torrent<S: AsRef<str>>(
&self,
path: S
) -> Result<(Vec<u8>, u16)>
[src]
&self,
path: S
) -> Result<(Vec<u8>, u16)>
pub async fn get_object_range<S: AsRef<str>>(
&self,
path: S,
start: u64,
end: Option<u64>
) -> Result<(Vec<u8>, u16)>
[src]
&self,
path: S,
start: u64,
end: Option<u64>
) -> Result<(Vec<u8>, u16)>
pub async fn get_object_stream<T: Write + Send, S: AsRef<str>>(
&self,
path: S,
writer: &mut T
) -> Result<u16>
[src]
&self,
path: S,
writer: &mut T
) -> Result<u16>
pub async fn put_object_stream<R: AsyncRead + Unpin>(
&self,
reader: &mut R,
s3_path: impl AsRef<str>
) -> Result<u16>
[src]
&self,
reader: &mut R,
s3_path: impl AsRef<str>
) -> Result<u16>
pub async fn location(&self) -> Result<(Region, u16)>
[src]
pub async fn delete_object<S: AsRef<str>>(
&self,
path: S
) -> Result<(Vec<u8>, u16)>
[src]
&self,
path: S
) -> Result<(Vec<u8>, u16)>
pub async fn head_object<S: AsRef<str>>(
&self,
path: S
) -> Result<(HeadObjectResult, u16)>
[src]
&self,
path: S
) -> Result<(HeadObjectResult, u16)>
pub async fn put_object_with_content_type<S: AsRef<str>>(
&self,
path: S,
content: &[u8],
content_type: &str
) -> Result<(Vec<u8>, u16)>
[src]
&self,
path: S,
content: &[u8],
content_type: &str
) -> Result<(Vec<u8>, u16)>
pub async fn put_object<S: AsRef<str>>(
&self,
path: S,
content: &[u8]
) -> Result<(Vec<u8>, u16)>
[src]
&self,
path: S,
content: &[u8]
) -> Result<(Vec<u8>, u16)>
pub async fn put_object_tagging<S: AsRef<str>>(
&self,
path: &str,
tags: &[(S, S)]
) -> Result<(Vec<u8>, u16)>
[src]
&self,
path: &str,
tags: &[(S, S)]
) -> Result<(Vec<u8>, u16)>
pub async fn delete_object_tagging<S: AsRef<str>>(
&self,
path: S
) -> Result<(Vec<u8>, u16)>
[src]
&self,
path: S
) -> Result<(Vec<u8>, u16)>
pub async fn get_object_tagging<S: AsRef<str>>(
&self,
path: S
) -> Result<(Vec<Tag>, u16)>
[src]
&self,
path: S
) -> Result<(Vec<Tag>, u16)>
pub async fn list_page(
&self,
prefix: String,
delimiter: Option<String>,
continuation_token: Option<String>,
start_after: Option<String>,
max_keys: Option<usize>
) -> Result<(ListBucketResult, u16)>
[src]
&self,
prefix: String,
delimiter: Option<String>,
continuation_token: Option<String>,
start_after: Option<String>,
max_keys: Option<usize>
) -> Result<(ListBucketResult, u16)>
pub async fn list(
&self,
prefix: String,
delimiter: Option<String>
) -> Result<Vec<ListBucketResult>>
[src]
&self,
prefix: String,
delimiter: Option<String>
) -> Result<Vec<ListBucketResult>>
pub async fn list_multiparts_uploads_page(
&self,
prefix: Option<&str>,
delimiter: Option<&str>,
key_marker: Option<String>,
max_uploads: Option<usize>
) -> Result<(ListMultipartUploadsResult, u16)>
[src]
&self,
prefix: Option<&str>,
delimiter: Option<&str>,
key_marker: Option<String>,
max_uploads: Option<usize>
) -> Result<(ListMultipartUploadsResult, u16)>
pub async fn list_multiparts_uploads(
&self,
prefix: Option<&str>,
delimiter: Option<&str>
) -> Result<Vec<ListMultipartUploadsResult>>
[src]
&self,
prefix: Option<&str>,
delimiter: Option<&str>
) -> Result<Vec<ListMultipartUploadsResult>>
pub async fn abort_upload(&self, key: &str, upload_id: &str) -> Result<()>
[src]
pub fn is_path_style(&self) -> bool
[src]
pub fn is_path_style(&self) -> bool
[src]Get path_style field of the Bucket struct
pub fn is_subdomain_style(&self) -> bool
[src]
pub fn set_path_style(&mut self)
[src]
pub fn set_path_style(&mut self)
[src]Configure bucket to use path-style urls and headers
pub fn set_subdomain_style(&mut self)
[src]
pub fn set_subdomain_style(&mut self)
[src]Configure bucket to use subdomain style urls and headers [default]
pub fn host(&self) -> String
[src]
pub fn url(&self) -> String
[src]
pub fn path_style_host(&self) -> String
[src]
pub fn path_style_host(&self) -> String
[src]Get a paths-style reference to the hostname of the S3 API endpoint.
pub fn subdomain_style_host(&self) -> String
[src]
pub fn scheme(&self) -> String
[src]
pub fn access_key(&self) -> Option<String>
[src]
pub fn access_key(&self) -> Option<String>
[src]Get a reference to the AWS access key.
pub fn secret_key(&self) -> Option<String>
[src]
pub fn secret_key(&self) -> Option<String>
[src]Get a reference to the AWS secret key.
pub fn security_token(&self) -> Option<&str>
[src]
pub fn security_token(&self) -> Option<&str>
[src]Get a reference to the AWS security token.
pub fn session_token(&self) -> Option<&str>
[src]
pub fn session_token(&self) -> Option<&str>
[src]Get a reference to the AWS session token.
pub fn credentials(&self) -> &Credentials
[src]
pub fn credentials(&self) -> &Credentials
[src]Get a reference to the full Credentials
object used by this Bucket
.
pub fn set_credentials(&mut self, credentials: Credentials) -> Credentials
[src]
pub fn set_credentials(&mut self, credentials: Credentials) -> Credentials
[src]Change the credentials used by the Bucket, returning the existing credentials.
pub fn add_header(&mut self, key: &str, value: &str)
[src]
pub fn add_header(&mut self, key: &str, value: &str)
[src]Add an extra header to send with requests to S3.
Add an extra header to send with requests. Note that the library already sets a number of headers - headers set with this method will be overridden by the library headers:
- Host
- Content-Type
- Date
- Content-Length
- Authorization
- X-Amz-Content-Sha256
- X-Amz-Date
pub fn extra_headers(&self) -> &HeaderMap
[src]
pub fn extra_headers(&self) -> &HeaderMap
[src]Get a reference to the extra headers to be passed to the S3 API.
pub fn extra_headers_mut(&mut self) -> &mut HeaderMap
[src]
pub fn extra_headers_mut(&mut self) -> &mut HeaderMap
[src]Get a mutable reference to the extra headers to be passed to the S3 API.
pub fn add_query(&mut self, key: &str, value: &str)
[src]
pub fn add_query(&mut self, key: &str, value: &str)
[src]Add an extra query pair to the URL used for S3 API access.
pub fn extra_query(&self) -> &Query
[src]
pub fn extra_query(&self) -> &Query
[src]Get a reference to the extra query pairs to be passed to the S3 API.
pub fn extra_query_mut(&mut self) -> &mut Query
[src]
pub fn extra_query_mut(&mut self) -> &mut Query
[src]Get a mutable reference to the extra query pairs to be passed to the S3 API.
Trait Implementations
impl Eq for Bucket
[src]
impl StructuralEq for Bucket
[src]
impl StructuralPartialEq for Bucket
[src]
Auto Trait Implementations
impl RefUnwindSafe for Bucket
impl Send for Bucket
impl Sync for Bucket
impl Unpin for Bucket
impl UnwindSafe for Bucket
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,