Struct s3::credentials::Credentials
[−]
[src]
pub struct Credentials { pub access_key: String, pub secret_key: String, pub token: Option<String>, // some fields omitted }
AWS access credentials: access key, secret key, and optional token.
Example
use s3::credentials::Credentials; // Load from environment AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and // AWS_SESSION_TOKEN variables // TODO let credentials = Credentials::from_env().unwrap(); // Load credentials from the standard AWS credentials file with the given // profile name. // TODO let credentials = Credentials::from_profile("default").unwrap(); // Initialize directly with key ID, secret key, and optional token let credentials = Credentials::new("access_key", "secret_key", Some("token"));
Fields
access_key: String
AWS public access key.
secret_key: String
AWS secret key.
token: Option<String>
Temporary token issued by AWS service.
Methods
impl Credentials
[src]
fn new(access_key: &str, secret_key: &str, token: Option<&str>) -> Credentials
[src]
Initialize Credentials directly with key ID, secret key, and optional token.
Trait Implementations
impl Clone for Credentials
[src]
fn clone(&self) -> Credentials
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Credentials
[src]
impl Eq for Credentials
[src]
impl PartialEq for Credentials
[src]
fn eq(&self, __arg_0: &Credentials) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Credentials) -> bool
[src]
This method tests for !=
.