pub fn encode(&self, buf: &mut Vec<u8>) {
        match self {
            Data::Opaque(x) => buf.extend_from_slice(x),
            Data::Program(program) => program.encode(buf),
            Data::Predicate(predicate) => predicate.encode(buf),
            Data::Commitment(commitment) => commitment.encode(buf),
            Data::Scalar(scalar) => scalar.encode(buf),
            Data::Output(output) => output.encode(buf),
        };
    }
/// Encodes the data item to an opaque bytestring.
Encodes the data item to an opaque bytestring.
Encodes the data item to an opaque bytestring .
pub fn encode(&self, buf: &mut Vec<u8>) {
        match self {
            Data::Opaque(x) => buf.extend_from_slice(x),
            Data::Program(program) => program.encode(buf),
            Data::Predicate(predicate) => predicate.encode(buf),
            Data::Commitment(commitment) => commitment.encode(buf),
            Data::Scalar(scalar) => scalar.encode(buf),
            Data::Output(output) => output.encode(buf),
        };
    }
pub fn encode ( & self , buf : & mut Vec < u8 > ) { match self { Data :: Opaque ( x ) => buf . extend_from_slice ( x ) , Data :: Program ( program ) => program . encode ( buf ) , Data :: Predicate ( predicate ) => predicate . encode ( buf ) , Data :: Commitment ( commitment ) => commitment . encode ( buf ) , Data :: Scalar ( scalar ) => scalar . encode ( buf ) , Data :: Output ( output ) => output . encode ( buf ) , } ; }
Encodes the data item to an opaque bytestring.
Encodes the data item to an opaque bytestring .
&self
buf
&mut Vec<u8>
&self
buf
&mut Vec<u8>