I hereby claim:
- I am willemolding on github.
- I am willemolding (https://keybase.io/willemolding) on keybase.
- I have a public key ASBMQvdXACpvkHS6WV6NcL_q9v_qWILp3wRJAftGWzLAdAo
To claim this, I am signing this object:
Hey, I'm willemolding-6880154 and I have contributed to the RISC Zero STARK-to-SNARK Prover MPC Phase2 Trusted Setup ceremony. | |
The following are my contribution signatures: | |
Circuit # 1 (stark_verify) | |
Contributor # 71 | |
Contribution Hash: 5950eda2 565207cd afcd21ba a33e4375 | |
2ba6c9aa a4709e74 4bd94c5f 547a9542 | |
b21e058b f95a7d65 a0ac88aa d0ba2f85 | |
4cfb63fc f50ae185 fefb485b 39a52173 |
I hereby claim:
To claim this, I am signing this object:
#[derive(Serialize, Deserialize, Debug, PartialEq)] | |
struct SimplePartialType { | |
first: u8, | |
second: Value, | |
third: bool, | |
} | |
let mut de = Deserializer::from_reader_with_layout(example.as_slice(), &rule); | |
let result: SimplePartialType = Deserialize::deserialize(&mut de).unwrap(); |
const SIMPLE_RULE: &str = r#" | |
[ | |
"Record", | |
[ | |
{ "field_name": "first", "field_rule": ["Int"] }, | |
{ "field_name": "second", "field_rule": ["Record", [{ "field_name": "inner", "field_rule": ["Bool"] }] ] }, | |
{ "field_name": "third", "field_rule": ["Bool"] } | |
] | |
] | |
"#; |
impl<'de, 'a, R: Read> de::Deserializer<'de> for &'a mut Deserializer<R> { | |
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value> | |
where | |
V: Visitor<'de>, | |
{ | |
match self.layout_iter.next() { | |
Some(rule) => { | |
match rule { | |
BinProtRule::Unit => { | |
self.rdr.bin_read_unit()?; |
pub struct Deserializer<R: Read> { | |
pub rdr: BufReader<R>, | |
pub layout_iter: BinProtRuleIterator, | |
} | |
impl<R: Read> Deserializer<R> { | |
pub fn from_reader_with_layout(rdr: R, layout: &BinProtRule) -> Self { | |
Self { | |
rdr: BufReader::new(rdr), | |
layout_iter: layout.into_iter(), |
pub enum Value { | |
Unit, | |
Nat0(u32), | |
Bool(bool), | |
String(Vec<u8>), | |
Char(u8), | |
Int(i64), | |
Float(f64), | |
Option(Option<Box<Value>>), | |
Record(Vec<(String, Value)>), |
[ | |
"Record", | |
[ | |
{ "field_name": "first", "field_rule": ["Int"] }, | |
{ "field_name": "second", "field_rule": [ | |
"Record", [{ "field_name": "inner", "field_rule": ["Bool"] }] | |
]}, | |
{ "field_name": "third", "field_rule": [ | |
"Sum", | |
[ |
pub enum Value { | |
Null, | |
Bool(bool), | |
Number(Number), | |
String(String), | |
Array(Vec<Value>), | |
Object(Map<String, Value>), | |
} |
did:3:bafyreig52i4m6bthzvxrkdtjufbzefx6qoe4bdlx4o2pwnvttrtbbonfn4 |