pub fn to_usize(val: & Uint256) -> usize {
    let mut bytes: [u8; 8] = [0; 8];
    let val_bytes = val.to_bytes_le();
    for i in 0..7 {
        let mut byte = 0;
        if i < val_bytes.len() { byte = val_bytes[i]; }
        bytes[i] = byte;
    }
    return usize::from_le_bytes( bytes );
}
/* Takes lower 8 bits of val in little endian form and return a usize value*/
Takes lower 8 bits of val in little endian form and return a usize value
Takes lower 8 bits of val in little endian form and return a usize value
pub fn to_usize(val: & Uint256) -> usize {
    let mut bytes: [u8; 8] = [0; 8];
    let val_bytes = val.to_bytes_le();
    for i in 0..7 {
        let mut byte = 0;
        if i < val_bytes.len() { byte = val_bytes[i]; }
        bytes[i] = byte;
    }
    return usize::from_le_bytes( bytes );
}
pub fn to_usize ( val : & Uint256 ) -> usize { let mut bytes : [ u8 ; 8 ] = [ 0 ; 8 ] ; let val_bytes = val . to_bytes_le ( ) ; for i in 0 .. 7 { let mut byte = 0 ; if i < val_bytes . len ( ) { byte = val_bytes [ i ] ; } bytes [ i ] = byte ; } return usize :: from_le_bytes ( bytes ) ; }
Takes lower 8 bits of val in little endian form and return a usize value
Takes lower 8 bits of val in little endian form and return a usize value
val
& Uint256
val
& Uint256