hexga_core 0.0.11-beta.56

Basic set of functionalities common to all hexga crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Infaillible Builder
pub trait Builder
{
    type Output;
    fn build(&self) -> Self::Output;
    fn build_in(&self, dest: &mut Self::Output) { *dest = self.build(); }

    fn build_in_option(&self, dest: &mut Option<Self::Output>)
    {
        match dest
        {
            Some(op) => self.build_in(op),
            None => *dest = Some(self.build()),
        }
    }
}
// pub trait TryBuilder ...