#[default] #[serde(rename = "separate-outputs")] SeparateOutputs, #[serde(rename = "shared-output")] SharedOutput, } #[derive(Deserialize, Default, PartialEq, Debug, Clone)] #[serde(deny_unknown_fields)] pub(crate) struct BatchEntry { pub(crate) destination: Option>, pub(crate) file: PathBuf, pub(crate) metadata: Option, pub(crate) metaprotocol: Option, } impl BatchEntry { pub(crate) fn metadata(&self) -> Result>> { Ok(match &self.metadata { None => None, Some(metadata) => { let mut cbor = Vec::new(); ciborium::into_writer(&metadata, &mut cbor)?; Some(cbor) } }) } } #[derive(Deserialize, PartialEq, Debug, Clone, Default)] #[serde(deny_unknown_fields)] pub(crate) struct Batchfile { pub(crate) inscriptions: Vec, pub(crate) mode: Mode, pub(crate) parent: Option, pub(crate) postage: Option, } impl Batchfile { pub(crate) fn load(path: &Path) -> Result {