/// Read a `CToTransaction` from a `reader` of bytes and return it.
Read a `CToTransaction` from a `reader` of bytes and return it.
Read a ` CToTransaction ` from a ` reader ` of bytes and return it .
fn from_u8<R: Read>(mut reader: R) -> std::io::Result<Self> {
        let mut cm_note_new = [0; 32];
        let mut t_new = [0; 8];
        let mut data_len = [0; 8];
        let mut data = vec![];
        let mut epk = [0; 32];
        reader.read_exact(&mut cm_note_new)?;
        let cm_note_new = fr_from_repr(cm_note_new)?;
        reader.read_exact(&mut t_new)?;
        let t_new = TransactionTime(t_new);
        reader.read_exact(&mut data_len)?;
        let data_len = u8_array_to_u64(&data_len);
        for _ in 0..data_len {
            let mut byte = [0; 1];
            reader.read_exact(&mut byte)?;
            data.push(byte[0])
        }
        reader.read_exact(&mut epk)?;
        let epk = UnparsedPublicKey::new(&X25519, epk);
        let proof = Proof::<Bls12>::read(reader.by_ref())?;
        let mut vec_len = [0; 8];
        reader.read_exact(&mut vec_len)?;
        let mut signature = vec![0; u8_array_to_u64(&vec_len) as usize];
        reader.read_exact(&mut signature)?;
        Ok(CToTransaction {
            cm_note_new,
            t_new,
            data,
            epk,
            proof,
            signature,
        })
    }
fn from_u8 < R : Read > ( mut reader : R ) -> std :: io :: Result < Self > { let mut cm_note_new = [ 0 ; 32 ] ; let mut t_new = [ 0 ; 8 ] ; let mut data_len = [ 0 ; 8 ] ; let mut data = vec ! [ ] ; let mut epk = [ 0 ; 32 ] ; reader . read_exact ( & mut cm_note_new ) ? ; let cm_note_new = fr_from_repr ( cm_note_new ) ? ; reader . read_exact ( & mut t_new ) ? ; let t_new = TransactionTime ( t_new ) ; reader . read_exact ( & mut data_len ) ? ; let data_len = u8_array_to_u64 ( & data_len ) ; for _ in 0 .. data_len { let mut byte = [ 0 ; 1 ] ; reader . read_exact ( & mut byte ) ? ; data . push ( byte [ 0 ] ) } reader . read_exact ( & mut epk ) ? ; let epk = UnparsedPublicKey :: new ( & X25519 , epk ) ; let proof = Proof :: < Bls12 > :: read ( reader . by_ref ( ) ) ? ; let mut vec_len = [ 0 ; 8 ] ; reader . read_exact ( & mut vec_len ) ? ; let mut signature = vec ! [ 0 u8_array_to_u64 ( vec_len ) as usize ] ; reader . read_exact ( & mut signature ) ? ; Ok ( CToTransaction { cm_note_new , t_new , data , epk , proof , signature , } ) }
Read a `CToTransaction` from a `reader` of bytes and return it.
Read a ` CToTransaction ` from a ` reader ` of bytes and return it .
reader
R