(metric: DistanceMetric)
| 15 | // Implement From and Into traits to convert between the wrapper and real type |
| 16 | impl From<DistanceMetric> for DistanceMetricSchema { |
| 17 | fn from(metric: DistanceMetric) -> Self { |
| 18 | match metric { |
| 19 | DistanceMetric::Cosine => DistanceMetricSchema::Cosine, |
| 20 | DistanceMetric::Euclidean => DistanceMetricSchema::Euclidean, |
| 21 | DistanceMetric::Hamming => DistanceMetricSchema::Hamming, |
| 22 | DistanceMetric::DotProduct => DistanceMetricSchema::DotProduct, |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | impl From<DistanceMetricSchema> for DistanceMetric { |
nothing calls this directly
no outgoing calls
no test coverage detected