pub fn named_num<B>(b: &mut B, label: impl AsRef<[u8]>, n: u64)
where
    B: HashTreeBuilder,
{
    let mut buf = [0u8; MAX_U64_ENCODING_BYTES];
    let len = leb128::write::unsigned(&mut &mut buf[..], n).unwrap();
    named_blob(b, label, &buf[0..len]);
}
/// Builds a labeled leaf containing a number encoded in LEB128.
Builds a labeled leaf containing a number encoded in LEB128.
Builds a labeled leaf containing a number encoded in LEB128 .
pub fn named_num<B>(b: &mut B, label: impl AsRef<[u8]>, n: u64)
where
    B: HashTreeBuilder,
{
    let mut buf = [0u8; MAX_U64_ENCODING_BYTES];
    let len = leb128::write::unsigned(&mut &mut buf[..], n).unwrap();
    named_blob(b, label, &buf[0..len]);
}
pub fn named_num < B > ( b : & mut B , label : impl AsRef < [ u8 ] > , n : u64 ) where B : HashTreeBuilder , { let mut buf = [ 0u8 ; MAX_U64_ENCODING_BYTES ] ; let len = leb128 :: write :: unsigned ( & mut & mut buf [ .. ] , n ) . unwrap ( ) ; named_blob ( b , label , & buf [ 0 .. len ] ) ; }
Builds a labeled leaf containing a number encoded in LEB128.
Builds a labeled leaf containing a number encoded in LEB128 .
b
&mut B
label
impl AsRef<[u8]>
n
u64
b
&mut B
label
impl AsRef<[u8]>
n
u64