File tree Expand file tree Collapse file tree 3 files changed +5
-85
lines changed
rust/catalyst-signed-doc-macro/src Expand file tree Collapse file tree 3 files changed +5
-85
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22//! spec.
33
44mod error;
5- mod field;
65mod rules;
76mod signed_doc_spec;
87mod types_consts;
Original file line number Diff line number Diff line change 11//! Catalyst Signed Document spec type
22
33pub ( crate ) mod doc_ref;
4+ pub ( crate ) mod field;
45
56use std:: { collections:: HashMap , ops:: Deref } ;
67
78use proc_macro2:: Ident ;
89use quote:: format_ident;
910
10- use crate :: field;
11-
1211/// Catalyst Signed Document spec representation struct
1312#[ derive( serde:: Deserialize ) ]
1413pub ( crate ) struct CatalystSignedDocSpec {
@@ -46,7 +45,8 @@ pub(crate) struct DocSpec {
4645 /// Document type UUID v4 value
4746 #[ serde( rename = "type" ) ]
4847 pub ( crate ) doc_type : String ,
49-
48+ /// `headers` field
49+ pub ( crate ) headers : field:: Headers ,
5050 /// Document type metadata definitions
5151 pub ( crate ) metadata : Metadata ,
5252}
@@ -105,7 +105,8 @@ impl CatalystSignedDocSpec {
105105 // #[allow(dependency_on_unit_never_type_fallback)]
106106 pub ( crate ) fn load_signed_doc_spec ( ) -> anyhow:: Result < CatalystSignedDocSpec > {
107107 let signed_doc_str = include_str ! ( "../../../../specs/signed_doc.json" ) ;
108- let signed_doc_spec = serde_json:: from_str ( signed_doc_str) ?;
108+ let signed_doc_spec = serde_json:: from_str ( signed_doc_str)
109+ . map_err ( |e| anyhow:: anyhow!( "Invalid Catalyst Signed Documents JSON Spec: {e}" ) ) ?;
109110 Ok ( signed_doc_spec)
110111 }
111112}
You can’t perform that action at this time.
0 commit comments