Struct rusty_s3::credentials::Credentials
source · 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 copy 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
source§fn eq(&self, other: &Credentials) -> bool
fn eq(&self, other: &Credentials) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Credentials
impl StructuralEq for Credentials
impl StructuralPartialEq for Credentials
Auto Trait Implementations§
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