pub struct KeySources {
pub key: Option<String>,
pub credentials_dir: Option<PathBuf>,
pub key_file: Option<PathBuf>,
pub default_file: PathBuf,
}Expand description
Where the key is looked for, in order. Injectable for tests.
Fields§
§key: Option<String>ISB_AGE_KEY: the key itself.
credentials_dir: Option<PathBuf>$CREDENTIALS_DIRECTORY, where systemd puts isb-age-key.
key_file: Option<PathBuf>ISB_AGE_KEY_FILE: must exist when set.
default_file: PathBuf~/.config/isb/age.txt: read when present, else generated.
Implementations§
Source§impl KeySources
impl KeySources
pub fn from_env() -> KeySources
Trait Implementations§
Source§impl Clone for KeySources
impl Clone for KeySources
Source§impl Debug for KeySources
impl Debug for KeySources
Auto Trait Implementations§
impl Freeze for KeySources
impl RefUnwindSafe for KeySources
impl Send for KeySources
impl Sync for KeySources
impl Unpin for KeySources
impl UnsafeUnpin for KeySources
impl UnwindSafe for KeySources
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