Struct rejson::SecretsFile
source · pub struct SecretsFile { /* private fields */ }Implementations§
source§impl SecretsFile
impl SecretsFile
sourcepub fn load<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn load<P: AsRef<Path>>(path: P) -> Result<Self>
Creates a new [Parser] by reading the specified file.
sourcepub fn public_key(&self) -> Option<Key>
pub fn public_key(&self) -> Option<Key>
Extracts the public key from the JSON object.
sourcepub fn transform<F: Transform>(&mut self, transformer: F) -> Result<()>
pub fn transform<F: Transform>(&mut self, transformer: F) -> Result<()>
Performs the supplied transformation function on each eligible value in the document. Eligible in this case refers to string values who’s key does not start with an underscore.
The transformer will be called for each eligible string value and is expected to return a new value to be used in it’s place.
This function transforms the values in place by mutating the underlying structure.
Trait Implementations§
source§impl Debug for SecretsFile
impl Debug for SecretsFile
source§impl Display for SecretsFile
impl Display for SecretsFile
Auto Trait Implementations§
impl RefUnwindSafe for SecretsFile
impl Send for SecretsFile
impl Sync for SecretsFile
impl Unpin for SecretsFile
impl UnwindSafe for SecretsFile
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