Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv-cli/src/main.rs')
-rw-r--r--crates/proc-macro-srv-cli/src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/proc-macro-srv-cli/src/main.rs b/crates/proc-macro-srv-cli/src/main.rs
index 813ac339a9..d3dae0494f 100644
--- a/crates/proc-macro-srv-cli/src/main.rs
+++ b/crates/proc-macro-srv-cli/src/main.rs
@@ -52,6 +52,8 @@ fn main() -> std::io::Result<()> {
enum ProtocolFormat {
JsonLegacy,
PostcardLegacy,
+ JsonNew,
+ PostcardNew,
}
impl ValueEnum for ProtocolFormat {
@@ -65,12 +67,16 @@ impl ValueEnum for ProtocolFormat {
ProtocolFormat::PostcardLegacy => {
Some(clap::builder::PossibleValue::new("postcard-legacy"))
}
+ ProtocolFormat::JsonNew => Some(clap::builder::PossibleValue::new("json-new")),
+ ProtocolFormat::PostcardNew => Some(clap::builder::PossibleValue::new("postcard-new")),
}
}
fn from_str(input: &str, _ignore_case: bool) -> Result<Self, String> {
match input {
"json-legacy" => Ok(ProtocolFormat::JsonLegacy),
"postcard-legacy" => Ok(ProtocolFormat::PostcardLegacy),
+ "postcard-new" => Ok(ProtocolFormat::PostcardNew),
+ "json-new" => Ok(ProtocolFormat::JsonNew),
_ => Err(format!("unknown protocol format: {input}")),
}
}