objc2_core_ml/generated/
MLSequence.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    /// An immutable container holding an ordered collection of feature values
11    /// of the same type.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlsequence?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct MLSequence;
17);
18
19extern_conformance!(
20    unsafe impl NSCoding for MLSequence {}
21);
22
23extern_conformance!(
24    unsafe impl NSObjectProtocol for MLSequence {}
25);
26
27extern_conformance!(
28    unsafe impl NSSecureCoding for MLSequence {}
29);
30
31impl MLSequence {
32    extern_methods!(
33        #[cfg(feature = "MLFeatureType")]
34        /// Type of values held
35        #[unsafe(method(type))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn r#type(&self) -> MLFeatureType;
38
39        #[cfg(feature = "MLFeatureType")]
40        /// Empty sequence of a sepcific type
41        #[unsafe(method(emptySequenceWithType:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn emptySequenceWithType(r#type: MLFeatureType) -> Retained<Self>;
44
45        /// String sequences, property will be empty array if type is MLFeatureTypeString
46        #[unsafe(method(sequenceWithStringArray:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn sequenceWithStringArray(string_values: &NSArray<NSString>) -> Retained<Self>;
49
50        #[unsafe(method(stringValues))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn stringValues(&self) -> Retained<NSArray<NSString>>;
53
54        /// int64 sequence, propery will be empty array if type is MLFeatureTypeInt64
55        #[unsafe(method(sequenceWithInt64Array:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn sequenceWithInt64Array(int64_values: &NSArray<NSNumber>) -> Retained<Self>;
58
59        #[unsafe(method(int64Values))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn int64Values(&self) -> Retained<NSArray<NSNumber>>;
62    );
63}
64
65/// Methods declared on superclass `NSObject`.
66impl MLSequence {
67    extern_methods!(
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72        #[unsafe(method(new))]
73        #[unsafe(method_family = new)]
74        pub unsafe fn new() -> Retained<Self>;
75    );
76}