Struct remoteit_api::credentials::Credentials
source · pub struct Credentials { /* private fields */ }
Implementations§
source§impl Credentials
impl Credentials
sourcepub fn builder() -> CredentialsBuilder
pub fn builder() -> CredentialsBuilder
Validated the given secret access key and creates a new Credentials
struct.
§Errors
base64::DecodeError
if the secret access key is not base64 encoded.
§Example
let credentials = Credentials::builder()
.r3_access_key_id("foo")
.r3_secret_access_key("YmFy")
.build();
source§impl Credentials
impl Credentials
Impl block for credentials_loader related functions.
sourcepub fn load_from_disk() -> CredentialsLoadFromDiskBuilder
pub fn load_from_disk() -> CredentialsLoadFromDiskBuilder
Attempts to load the remote.it credentials from the user’s home directory.
The default location is ~/.remoteit/credentials
.
§Errors
- [
Error::HomeDirNotFound
], when thedirs
create cannot find the user’s home directory. - [
Error::CouldNotReadCredentials
], when the credentials file could not be parsed by the [figment
] crate.
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<'de> Deserialize<'de> for Credentials
impl<'de> Deserialize<'de> for Credentials
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for Credentials
impl Hash for Credentials
source§impl Ord for Credentials
impl Ord for Credentials
source§fn cmp(&self, other: &Credentials) -> Ordering
fn cmp(&self, other: &Credentials) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Credentials
impl PartialEq for Credentials
source§impl PartialOrd for Credentials
impl PartialOrd for Credentials
source§impl Serialize for Credentials
impl Serialize 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.