pub struct ApiKeyPairs { /* private fields */ }Implementations§
Source§impl ApiKeyPairs
impl ApiKeyPairs
pub fn new() -> ApiKeyPairs
Source§impl ApiKeyPairs
impl ApiKeyPairs
pub fn add(&mut self, profile_name: String, key: String, secret: String)
pub fn get(&self, profile_name: &str) -> Option<&ApiKeyPair>
Sourcepub fn load_from_json_file(
file_path: &str,
) -> Result<ApiKeyPairs, Box<dyn Error>>
pub fn load_from_json_file( file_path: &str, ) -> Result<ApiKeyPairs, Box<dyn Error>>
Load API keys from a JSON file.
Expected format: array of { "profile_name", "key", "secret" } objects.
Trait Implementations§
Source§impl Debug for ApiKeyPairs
impl Debug for ApiKeyPairs
Source§impl Default for ApiKeyPairs
impl Default for ApiKeyPairs
Source§impl<'de> Deserialize<'de> for ApiKeyPairs
impl<'de> Deserialize<'de> for ApiKeyPairs
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
Auto Trait Implementations§
impl Freeze for ApiKeyPairs
impl RefUnwindSafe for ApiKeyPairs
impl Send for ApiKeyPairs
impl Sync for ApiKeyPairs
impl Unpin for ApiKeyPairs
impl UnsafeUnpin for ApiKeyPairs
impl UnwindSafe for ApiKeyPairs
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