pub enum CredentialSource {
Local,
Remote {
endpoint: String,
machine_token: String,
},
}Expand description
Where a client gets its provider credentials.
Variants§
Local
Read + refresh the local auth.json (default — unchanged behavior).
Remote
Fetch short-lived access tokens from a broker over the network.
Implementations§
Source§impl CredentialSource
impl CredentialSource
Sourcepub fn from_parts(
endpoint: Option<String>,
machine_token: Option<String>,
) -> Self
pub fn from_parts( endpoint: Option<String>, machine_token: Option<String>, ) -> Self
Build from explicit config values. Returns Remote iff a non-empty
endpoint is given; otherwise Local. Trailing slashes on the endpoint
are trimmed so callers can join paths uniformly.
pub fn is_remote(&self) -> bool
Trait Implementations§
Source§impl Clone for CredentialSource
impl Clone for CredentialSource
Source§fn clone(&self) -> CredentialSource
fn clone(&self) -> CredentialSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CredentialSource
Redacting Debug — never print the machine token (board M3/B3).
impl Debug for CredentialSource
Redacting Debug — never print the machine token (board M3/B3).
Source§impl Default for CredentialSource
impl Default for CredentialSource
Source§fn default() -> CredentialSource
fn default() -> CredentialSource
Returns the “default value” for a type. Read more
impl Eq for CredentialSource
Source§impl PartialEq for CredentialSource
impl PartialEq for CredentialSource
Source§fn eq(&self, other: &CredentialSource) -> bool
fn eq(&self, other: &CredentialSource) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CredentialSource
Auto Trait Implementations§
impl Freeze for CredentialSource
impl RefUnwindSafe for CredentialSource
impl Send for CredentialSource
impl Sync for CredentialSource
impl Unpin for CredentialSource
impl UnsafeUnpin for CredentialSource
impl UnwindSafe for CredentialSource
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§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.