/// Write a number as a big-endian hex string using the most compact
/// representation possible (i.e: trimming leading zeros).
Write a number as a big-endian hex string using the most compact
representation possible .
Write a number as a big - endian hex string using the most compact representation possible .
pub fn write_num<D: BeBytes + PrimInt>(&mut self, digit: D) -> Result<(), Error<C::Error>> {
        if digit.is_zero() {
            return self.write_hex(0);
        }
        let mut buf = [0; 16];
        // infallible (unless digit is a >128 bit number)
        let len = digit.to_be_bytes(&mut buf).unwrap();
        let buf = &buf[..len];
        buf.iter()
            .copied()
            .skip_while(|&b| b == 0)
            .try_for_each(|b| self.write_hex(b))
    }
pub fn write_num < D : BeBytes + PrimInt > ( & mut self , digit : D ) -> Result < ( ) , Error < C :: Error > > { if digit . is_zero ( ) { return self . write_hex ( 0 ) ; } let mut buf = [ 0 ; 16 ] ; // infallible (unless digit is a >128 bit number) let len = digit . to_be_bytes ( & mut buf ) . unwrap ( ) ; let buf = & buf [ .. len ] ; buf . iter ( ) . copied ( ) . skip_while ( | & b | b == 0 ) . try_for_each ( | b | self . write_hex ( b ) ) }
Write a number as a big-endian hex string using the most compact
representation possible (i.e: trimming leading zeros).
Write a number as a big - endian hex string using the most compact representation possible ( i . e : trimming leading zeros ) .
&mut self
digit
D