Skip to content

Commit 21bb3bf

Browse files
committed
blsforme/entry: Allow extension using custom cmdline snippet
Signed-off-by: Ikey Doherty <[email protected]>
1 parent cc7698c commit 21bb3bf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

blsforme/src/entry.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ impl<'a> Entry<'a> {
8181
}
8282
}
8383

84+
/// With the given cmdline entry
85+
/// Used by moss to inject a `moss.tx={}` parameter
86+
pub fn with_cmdline(self, entry: CmdlineEntry) -> Self {
87+
let mut cmdline = self.cmdline;
88+
cmdline.push(entry);
89+
Self { cmdline, ..self }
90+
}
91+
8492
/// Return an entry ID, suitable for `.conf` generation
8593
pub fn id(&self, schema: &Schema) -> String {
8694
// TODO: For BLS schema, grab something even uniquer (TM)

0 commit comments

Comments
 (0)