pub enum SecretUri {
Plain(String),
Keychain {
service: String,
key: String,
},
OnePassword {
vault: String,
item: String,
field: String,
},
Env {
var_name: String,
},
File {
path: PathBuf,
},
Base64 {
data: String,
},
}Expand description
Represents a secret reference that can be resolved from various backends.
Supports the following URI schemes:
keychain://service/key- OS keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service)op://vault/item/field- 1Password CLIenv://VAR_NAME- Environment variablefile:///path/to/file- File content- Plain string - Literal value (backwards compatible)
Variants§
Plain(String)
Plain text value (no URI scheme, backwards compatible)
Keychain
OS Keychain: keychain://service/key
OnePassword
1Password CLI: op://vault/item/field
Env
Environment variable: env://VAR_NAME
File
File path: file:///path/to/file or just a path
Base64
Base64 encoded value: base64://...
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretUri
Custom serde deserializer for SecretUri
impl<'de> Deserialize<'de> for SecretUri
Custom serde deserializer for SecretUri
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
impl StructuralPartialEq for SecretUri
Auto Trait Implementations§
impl Freeze for SecretUri
impl RefUnwindSafe for SecretUri
impl Send for SecretUri
impl Sync for SecretUri
impl Unpin for SecretUri
impl UnwindSafe for SecretUri
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