From 21bb3bf4b13d005eeea1fcee3e2ae973be111f31 Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Thu, 2 Jan 2025 21:30:28 +0000 Subject: [PATCH] blsforme/entry: Allow extension using custom cmdline snippet Signed-off-by: Ikey Doherty --- blsforme/src/entry.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/blsforme/src/entry.rs b/blsforme/src/entry.rs index b15f945..4091d83 100644 --- a/blsforme/src/entry.rs +++ b/blsforme/src/entry.rs @@ -81,6 +81,14 @@ impl<'a> Entry<'a> { } } + /// With the given cmdline entry + /// Used by moss to inject a `moss.tx={}` parameter + pub fn with_cmdline(self, entry: CmdlineEntry) -> Self { + let mut cmdline = self.cmdline; + cmdline.push(entry); + Self { cmdline, ..self } + } + /// Return an entry ID, suitable for `.conf` generation pub fn id(&self, schema: &Schema) -> String { // TODO: For BLS schema, grab something even uniquer (TM)