(&self)
| 553 | } |
| 554 | |
| 555 | fn length(&self) -> usize { |
| 556 | match self { |
| 557 | Self::Empty => 1, |
| 558 | Self::Blinded { commitment } => commitment.length(), |
| 559 | Self::Leaf { .. } | Self::Extension { .. } | Self::Branch { .. } => { |
| 560 | let payload_length = self.payload_length(); |
| 561 | Header { list: true, payload_length }.length() + payload_length |
| 562 | } |
| 563 | } |
| 564 | } |
| 565 | } |
| 566 | |
| 567 | impl Decodable for TrieNode { |