Struct rusty_s3::credentials::Credentials
source · [−]pub struct Credentials { /* private fields */ }Expand description
S3 credentials
Implementations
sourceimpl 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
sourceimpl Clone for Credentials
impl Clone for Credentials
sourcefn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Credentials
impl Debug for Credentials
sourceimpl PartialEq<Credentials> for Credentials
impl PartialEq<Credentials> for Credentials
sourcefn 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 ==. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more