pub struct KeyringPaths { /* private fields */ }Expand description
The value of the key gpgkeypath: the list of the GPG keyrings that a
remote or a trust group trusts.
remote::GpgKeyPath states the rules of the list. A list is the result of
Value::parse or the empty list of Default.
§Examples
use ostrya_core::config::{KeyringPaths, Value};
let paths = KeyringPaths::parse(r"/etc/one.gpg;k\s.gpg;").unwrap();
assert_eq!(paths.entries(), ["/etc/one.gpg", r"k\s.gpg"]);
assert!(KeyringPaths::parse("../k.gpg").is_err());
assert!(KeyringPaths::default().entries().is_empty());Implementations§
Source§impl KeyringPaths
impl KeyringPaths
Trait Implementations§
Source§impl Clone for KeyringPaths
impl Clone for KeyringPaths
Source§impl Debug for KeyringPaths
impl Debug for KeyringPaths
Source§impl Default for KeyringPaths
impl Default for KeyringPaths
impl Eq for KeyringPaths
Source§impl Hash for KeyringPaths
impl Hash for KeyringPaths
Source§impl PartialEq for KeyringPaths
impl PartialEq for KeyringPaths
impl StructuralPartialEq for KeyringPaths
Source§impl Value for KeyringPaths
The text is read as written, with no decode. A ; separates the
entries. The parse removes one empty entry at the end of the list and
keeps each other empty entry, so an empty text gives one empty entry.
The parse refuses an entry that is a relative path with a ..
component. The check of a relative path and of a .. component follows
the path rules of the target platform.
impl Value for KeyringPaths
The text is read as written, with no decode. A ; separates the
entries. The parse removes one empty entry at the end of the list and
keeps each other empty entry, so an empty text gives one empty entry.
The parse refuses an entry that is a relative path with a ..
component. The check of a relative path and of a .. component follows
the path rules of the target platform.
format joins the entries with ;, and adds a ; if the list has more
than one entry and its last entry is empty. The empty list gives the
empty text, which parses as one empty entry.