pub struct FileBackend;Expand description
Stdlib-only backend that reads secrets from files.
Default behavior strips exactly one trailing \n or \r\n from the
file contents — matching the dominant convention for Docker secrets,
Kubernetes secrets, and systemd-creds. Use ?raw=true for verbatim
bytes.
Trait Implementations§
Source§impl Backend for FileBackend
impl Backend for FileBackend
Source§fn validate(&self, url: &Url) -> Result<(), Error>
fn validate(&self, url: &Url) -> Result<(), Error>
Validate URL grammar without performing I/O. Read more
Source§fn get(&self, url: &Url) -> Result<SecretString, Error>
fn get(&self, url: &Url) -> Result<SecretString, Error>
Fetch the secret at the given URL. Read more
Source§fn put(&self, url: &Url, value: &SecretString) -> Result<(), Error>
fn put(&self, url: &Url, value: &SecretString) -> Result<(), Error>
Store a secret at the given URL. Read more
Source§fn list(&self, url: &Url) -> Result<Vec<Entry>, Error>
fn list(&self, url: &Url) -> Result<Vec<Entry>, Error>
List entries matching the URL prefix or pattern. Read more
Auto Trait Implementations§
impl Freeze for FileBackend
impl RefUnwindSafe for FileBackend
impl Send for FileBackend
impl Sync for FileBackend
impl Unpin for FileBackend
impl UnsafeUnpin for FileBackend
impl UnwindSafe for FileBackend
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