objc2_core_ml/generated/
MLParameterDescription.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Describes a model parameter along with a default value and any applicable constaint on the values.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlparameterdescription?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MLParameterDescription;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for MLParameterDescription {}
20);
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for MLParameterDescription {}
24);
25
26extern_conformance!(
27    unsafe impl NSSecureCoding for MLParameterDescription {}
28);
29
30impl MLParameterDescription {
31    extern_methods!(
32        #[cfg(all(feature = "MLKey", feature = "MLParameterKey"))]
33        #[unsafe(method(key))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn key(&self) -> Retained<MLParameterKey>;
36
37        #[unsafe(method(defaultValue))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn defaultValue(&self) -> Retained<AnyObject>;
40
41        #[cfg(feature = "MLNumericConstraint")]
42        #[unsafe(method(numericConstraint))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn numericConstraint(&self) -> Option<Retained<MLNumericConstraint>>;
45    );
46}
47
48/// Methods declared on superclass `NSObject`.
49impl MLParameterDescription {
50    extern_methods!(
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55        #[unsafe(method(new))]
56        #[unsafe(method_family = new)]
57        pub unsafe fn new() -> Retained<Self>;
58    );
59}