Converts `self` to a scalar if it is a byte vector, then casts the result to `u32`. # Arguments `st` - scalar type used to interpret `self` # Result Resulting scalar cast to `u32` # Examples ``` # use ciphercore_base::data_values::Value; # use ciphercore_base::data_types::INT32; let v = Value::from_scalar(-123456, INT32).unwrap(); assert_eq!(v.to_u32(INT32).unwrap(), -123456i32 as u32); ```
(&self, st: ScalarType)
| 529 | /// assert_eq!(v.to_u32(INT32).unwrap(), -123456i32 as u32); |
| 530 | /// ``` |
| 531 | pub fn to_u32(&self, st: ScalarType) -> Result<u32> { |
| 532 | Ok(self.to_u128(st)? as u32) |
| 533 | } |
| 534 | |
| 535 | /// Converts `self` to a scalar if it is a byte vector, then casts the result to `i32`. |
| 536 | /// |