(&self, buf: &mut impl BufMut)
| 366 | Block::read_cfg(buf, &())?, |
| 367 | )))), |
| 368 | 0x07 => Ok(Self::FinalizedHeader(Box::new(FinalizedHeader::< |
| 369 | bls12381_multisig::Scheme<PublicKey, V>, |
| 370 | >::read_cfg( |
| 371 | buf, &() |
| 372 | )?))), |
| 373 | byte => Err(Error::InvalidVarint(byte as usize)), |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | impl<V: Variant> Write for Value<V> { |
| 379 | fn write(&self, buf: &mut impl BufMut) { |
| 380 | match self { |
| 381 | Self::U64(val) => { |
| 382 | buf.put_u8(0x01); |
| 383 | buf.put_u64(*val); |
| 384 | } |
| 385 | Self::ConsensusState(state) => { |
| 386 | buf.put_u8(0x05); |
| 387 | state.write(buf); |
| 388 | } |
| 389 | Self::Checkpoint(checkpoint) => { |
| 390 | buf.put_u8(0x06); |
no outgoing calls
no test coverage detected