pub struct KeyLoader;Expand description
Private key loader
Implementations§
Source§impl KeyLoader
impl KeyLoader
Sourcepub fn load(input: &str) -> Result<String>
pub fn load(input: &str) -> Result<String>
Load private key from input (automatically detects file path vs PEM content)
§Arguments
input- Either a file path or PEM content string
§Returns
Private key string in PEM format
§Examples
// Load from file
let key = KeyLoader::load("~/.oci/key.pem").unwrap();
// Load from PEM content
let key = KeyLoader::load("-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----").unwrap();Auto Trait Implementations§
impl Freeze for KeyLoader
impl RefUnwindSafe for KeyLoader
impl Send for KeyLoader
impl Sync for KeyLoader
impl Unpin for KeyLoader
impl UnsafeUnpin for KeyLoader
impl UnwindSafe for KeyLoader
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