| 47 | impl TryFrom<&Distribution> for FFI_Distribution { |
| 48 | type Error = DataFusionError; |
| 49 | fn try_from(value: &Distribution) -> Result<Self, Self::Error> { |
| 50 | match value { |
| 51 | Distribution::Uniform(d) => Ok(FFI_Distribution::Uniform(d.try_into()?)), |
| 52 | Distribution::Exponential(d) => { |
| 53 | Ok(FFI_Distribution::Exponential(d.try_into()?)) |
| 54 | } |
| 55 | Distribution::Gaussian(d) => Ok(FFI_Distribution::Gaussian(d.try_into()?)), |
| 56 | Distribution::Bernoulli(d) => Ok(FFI_Distribution::Bernoulli(d.try_into()?)), |
| 57 | Distribution::Generic(d) => Ok(FFI_Distribution::Generic(d.try_into()?)), |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | impl TryFrom<FFI_Distribution> for Distribution { |