pub struct Credentials { /* private fields */ }Expand description
S3 credentials
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn new(key: impl Into<String>, secret: impl Into<String>) -> Self
pub fn new(key: impl Into<String>, secret: impl Into<String>) -> Self
Construct a new Credentials using the provided key and secret
Sourcepub fn new_with_token(
key: impl Into<String>,
secret: impl Into<String>,
token: impl Into<String>,
) -> Self
pub fn new_with_token( key: impl Into<String>, secret: impl Into<String>, token: impl Into<String>, ) -> Self
Construct a new Credentials using the provided key, secret and token
Sourcepub fn from_env() -> Option<Self>
pub fn from_env() -> Option<Self>
Construct a new Credentials using AWS’s default environment variables
Reads the key from the AWS_ACCESS_KEY_ID environment variable and the secret
from the AWS_SECRET_ACCESS_KEY environment variable.
If AWS_SESSION_TOKEN is set a token is also read.
Returns None if either environment variables aren’t set or they aren’t valid utf-8.
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Credentials
impl Debug for Credentials
Source§impl PartialEq for Credentials
impl PartialEq for Credentials
impl Eq for Credentials
impl StructuralPartialEq for Credentials
Auto Trait Implementations§
impl Freeze for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnwindSafe for Credentials
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