pub struct KeyManager { /* private fields */ }Expand description
Key storage and management
Implementations§
Source§impl KeyManager
impl KeyManager
pub fn new(git_dir: impl AsRef<Path>) -> Self
Sourcepub fn git_crypt_dir(&self) -> PathBuf
pub fn git_crypt_dir(&self) -> PathBuf
Get the path to the git-crypt directory
Sourcepub fn default_key_path(&self) -> PathBuf
pub fn default_key_path(&self) -> PathBuf
Get the path to the default key file
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if repository is initialized
Sourcepub fn generate_key(&self) -> Result<CryptoKey>
pub fn generate_key(&self) -> Result<CryptoKey>
Generate and save a new key
Auto Trait Implementations§
impl Freeze for KeyManager
impl RefUnwindSafe for KeyManager
impl Send for KeyManager
impl Sync for KeyManager
impl Unpin for KeyManager
impl UnwindSafe for KeyManager
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