pub struct AccountCredentials {
pub account_id: String,
pub api_token: String,
}Expand description
Resolved Cloudflare account credentials.
The account ID is operational metadata, not a secret; the token IS a secret and is only ever echoed back through Bearer headers - never into Display/Debug output (see the manual impls below).
Fields§
§account_id: String§api_token: StringImplementations§
Source§impl AccountCredentials
impl AccountCredentials
Sourcepub fn from_env() -> Result<Self, CloudflareError>
pub fn from_env() -> Result<Self, CloudflareError>
Resolve credentials from the environment.
Raises an actionable error naming the exact env var that is missing.
Sourcepub fn from_env_lenient() -> Option<Self>
pub fn from_env_lenient() -> Option<Self>
Validate credentials without requiring them (profile bootstrap).
Trait Implementations§
Source§impl Clone for AccountCredentials
impl Clone for AccountCredentials
Source§fn clone(&self) -> AccountCredentials
fn clone(&self) -> AccountCredentials
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 AccountCredentials
impl Debug for AccountCredentials
Auto Trait Implementations§
impl Freeze for AccountCredentials
impl RefUnwindSafe for AccountCredentials
impl Send for AccountCredentials
impl Sync for AccountCredentials
impl Unpin for AccountCredentials
impl UnsafeUnpin for AccountCredentials
impl UnwindSafe for AccountCredentials
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