pub fn serialize(&self) -> Vec<u8> {
        let mut out = Vec::new();

        for (hash, is_right) in &self.path {
            out.extend(Domain::serialize(hash));
            out.push(*is_right as u8);
        }
        out.extend(Domain::serialize(&self.leaf()));
        out.extend(Domain::serialize(self.root()));

        out
    }
/// Serialize into bytes.
/// TODO: probably improve
Serialize into bytes.
TODO: probably improve
Serialize into bytes . TODO : probably improve
pub fn serialize(&self) -> Vec<u8> {
        let mut out = Vec::new();
        for (hash, is_right) in &self.path {
            out.extend(Domain::serialize(hash));
            out.push(*is_right as u8);
        }
        out.extend(Domain::serialize(&self.leaf()));
        out.extend(Domain::serialize(self.root()));
        out
    }
pub fn serialize ( & self ) -> Vec < u8 > { let mut out = Vec :: new ( ) ; for ( hash , is_right ) in & self . path { out . extend ( Domain :: serialize ( hash ) ) ; out . push ( * is_right as u8 ) ; } out . extend ( Domain :: serialize ( & self . leaf ( ) ) ) ; out . extend ( Domain :: serialize ( self . root ( ) ) ) ; out }
Serialize into bytes.
Serialize into bytes .
&self
&self