Set the confidence level (0.0 to 1.0, stored as 0-100).
(mut self, confidence: f32)
| 296 | |
| 297 | /// Set the confidence level (0.0 to 1.0, stored as 0-100). |
| 298 | pub fn with_confidence(mut self, confidence: f32) -> Self { |
| 299 | self.confidence = Some((confidence.clamp(0.0, 1.0) * 100.0) as u8); |
| 300 | self |
| 301 | } |
| 302 | |
| 303 | /// Get the confidence as a float (0.0 to 1.0). |
| 304 | pub fn confidence_float(&self) -> Option<f32> { |
no outgoing calls