1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pub mod kernel;
use balloons::{Balloon, BalloonBuilder};
#[derive(Default)]
pub struct Blake2b256BalloonBuilder(BalloonBuilder);
pub type Blake2b256Balloon = Balloon<kernel::U256, kernel::H256, kernel::Blake2b256>;
impl ::std::ops::Deref for Blake2b256BalloonBuilder {
type Target = BalloonBuilder;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl ::std::ops::DerefMut for Blake2b256BalloonBuilder {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl AsMut<BalloonBuilder> for Blake2b256BalloonBuilder {
fn as_mut(&mut self) -> &mut BalloonBuilder {
&mut self.0
}
}
impl Blake2b256BalloonBuilder {
pub fn new() -> Self {
Default::default()
}
pub fn build(&self) -> Blake2b256Balloon {
self.0.build()
}
}