objc2_core_ml/generated/
MLSpecializationStrategy.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// The optimization strategy for the model specialization.
8///
9/// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlspecializationstrategy?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct MLSpecializationStrategy(pub NSInteger);
14impl MLSpecializationStrategy {
15    /// The strategy that works well for most applications.
16    #[doc(alias = "MLSpecializationStrategyDefault")]
17    pub const Default: Self = Self(0);
18    /// Prefer the prediction latency at the potential cost of specialization time, memory footprint, and the disk space usage of specialized artifacts.
19    #[doc(alias = "MLSpecializationStrategyFastPrediction")]
20    pub const FastPrediction: Self = Self(1);
21}
22
23unsafe impl Encode for MLSpecializationStrategy {
24    const ENCODING: Encoding = NSInteger::ENCODING;
25}
26
27unsafe impl RefEncode for MLSpecializationStrategy {
28    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
29}