Converts `self` to a scalar if it is a byte vector, then cast the result to `i128`. # Arguments `st` - scalar type used to interpret `self` # Result Resulting scalar cast to `i128` # 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_i128(INT32).unwrap(), -123456i32 as i128); `
(&self, st: ScalarType)
| 643 | /// assert_eq!(v.to_i128(INT32).unwrap(), -123456i32 as i128); |
| 644 | /// ``` |
| 645 | pub fn to_i128(&self, st: ScalarType) -> Result<i128> { |
| 646 | Ok(self.to_u128(st)? as i128) |
| 647 | } |
| 648 | |
| 649 | /// Converts `self` to a vector of values or return an error if `self` is a byte vector. |
| 650 | /// |