pub struct Credentials { /* private fields */ }Expand description
ALIYUN 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 ALIYUN’s default environment variables
Reads the key from the ALIYUN_ACCESS_KEY_ID environment variable and the secret
from the ALIYUN_ACCESS_KEY_SECRET environment variable.
If ALIYUN_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.
see: https://help.aliyun.com/zh/oss/developer-reference/oss-java-configure-access-credentials
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§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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)