pub struct Secret { /* private fields */ }Expand description
The fields stored at one path.
No #[derive(Debug)], and there will not be one: this is the value the
whole package exists to keep out of logs, and a derived Debug is how it
reaches one — through a dbg! left behind, a panic message, or a struct
somewhere upstream that derived Debug over a field holding this.
Implementations§
Source§impl Secret
impl Secret
pub fn new( path: impl Into<String>, fields: BTreeMap<String, String>, lease: Lease, ) -> Secret
Sourcepub fn from_response(path: &str, response: &VaultResponse) -> Secret
pub fn from_response(path: &str, response: &VaultResponse) -> Secret
Unwrap whatever the store answered a read with.
pub fn path(&self) -> &str
pub fn field(&self, name: &str) -> Option<&str>
Sourcepub fn names(&self) -> Vec<&str>
pub fn names(&self) -> Vec<&str>
The field names, which are safe to print — and the single most useful thing to say when a reference names a field that is not there.
pub fn lease(&self) -> &Lease
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Secret
impl RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl UnsafeUnpin for Secret
impl UnwindSafe for Secret
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