[−][src]Struct s3::bucket::Bucket
Example
use s3::bucket::Bucket; use awscreds::Credentials; let bucket_name = "rust-s3-test"; let region = "us-east-1".parse().unwrap(); let credentials = Credentials::default().unwrap(); let bucket = Bucket::new(bucket_name, region, credentials);
Fields
name: Stringregion: Regioncredentials: Credentialsextra_headers: HashMap<String, String>extra_query: HashMap<String, String>Implementations
impl Bucket[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]
Configure bucket to use path-style urls and headers
pub fn set_subdomain_style(&mut self)[src]
Configure bucket to use subdomain style urls and headers [default]
pub fn name(&self) -> String[src]
Get a reference to the name of the S3 bucket.
pub fn host(&self) -> String[src]
pub fn url(&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 region(&self) -> Region[src]
Get the region this object will connect to.
pub fn access_key(&self) -> Option<String>[src]
Get a reference to the AWS access key.
pub fn secret_key(&self) -> Option<String>[src]
Get a reference to the AWS secret key.
pub fn security_token(&self) -> Option<&str>[src]
Get a reference to the AWS security token.
pub fn session_token(&self) -> Option<&str>[src]
Get a reference to the AWS session token.
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]
Change the credentials used by the Bucket, returning the existing credentials.
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) -> &HashMap<String, String>[src]
Get a reference to the extra headers to be passed to the S3 API.
pub fn extra_headers_mut(&mut self) -> &mut HashMap<String, String>[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]
Add an extra query pair to the URL used for S3 API access.
pub fn extra_query(&self) -> &HashMap<String, String>[src]
Get a reference to the extra query pairs to be passed to the S3 API.
pub fn extra_query_mut(&mut self) -> &mut HashMap<String, String>[src]
Get a mutable reference to the extra query pairs to be passed to the S3 API.
Trait Implementations
impl Clone for Bucket[src]
impl Debug for Bucket[src]
impl Eq for Bucket[src]
impl PartialEq<Bucket> 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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,