pub struct AgePreprocessor { /* private fields */ }Expand description
age decryption preprocessor. Constructed from
[preprocessor.age] config + the shared CommandRunner.
Holds the identity path resolved at construction so every
expand() call uses the same identity file (no re-reading of
env vars per file). The path is not validated to exist at
construction; age validates at decrypt time and emits a
diagnostic we surface verbatim if the file is missing.
Implementations§
Source§impl AgePreprocessor
impl AgePreprocessor
pub fn new( runner: Arc<dyn CommandRunner>, identity: PathBuf, extensions: Vec<String>, ) -> Self
Sourcepub fn from_env(runner: Arc<dyn CommandRunner>) -> Self
pub fn from_env(runner: Arc<dyn CommandRunner>) -> Self
Construct with the canonical ~/.config/age/identity.txt
default identity and the default ["age"] extension set —
matches what most users have installed via age-keygen.
Trait Implementations§
Source§impl Preprocessor for AgePreprocessor
impl Preprocessor for AgePreprocessor
Source§fn transform_type(&self) -> TransformType
fn transform_type(&self) -> TransformType
The safety model for this transformation.
Source§fn matches_extension(&self, filename: &str) -> bool
fn matches_extension(&self, filename: &str) -> bool
Whether this preprocessor handles a file with the given name.
Source§fn stripped_name(&self, filename: &str) -> String
fn stripped_name(&self, filename: &str) -> String
Strip the preprocessor extension to get the logical filename.
e.g.
"config.toml.tmpl" → "config.toml".Source§fn expand(&self, source: &Path, _fs: &dyn Fs) -> Result<Vec<ExpandedFile>>
fn expand(&self, source: &Path, _fs: &dyn Fs) -> Result<Vec<ExpandedFile>>
Expand the source file into one or more output files. Read more
Source§fn supports_reverse_merge(&self) -> bool
fn supports_reverse_merge(&self) -> bool
Whether this preprocessor participates in the reverse-merge
pipeline. Reverse-merge is the cache-backed flow that lets
dodot transform check propagate edits from the deployed file
back into the source by writing a unified diff (and, for
ambiguous edits, dodot-conflict marker blocks). Read moreAuto Trait Implementations§
impl Freeze for AgePreprocessor
impl !RefUnwindSafe for AgePreprocessor
impl Send for AgePreprocessor
impl Sync for AgePreprocessor
impl Unpin for AgePreprocessor
impl UnsafeUnpin for AgePreprocessor
impl !UnwindSafe for AgePreprocessor
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