objc2-core-ml 0.3.2

Bindings to the CoreML framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// An immutable container holding an ordered collection of feature values
    /// of the same type.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlsequence?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MLSequence;
);

extern_conformance!(
    unsafe impl NSCoding for MLSequence {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for MLSequence {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for MLSequence {}
);

impl MLSequence {
    extern_methods!(
        #[cfg(feature = "MLFeatureType")]
        /// Type of values held
        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub unsafe fn r#type(&self) -> MLFeatureType;

        #[cfg(feature = "MLFeatureType")]
        /// Empty sequence of a sepcific type
        #[unsafe(method(emptySequenceWithType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn emptySequenceWithType(r#type: MLFeatureType) -> Retained<Self>;

        /// String sequences, property will be empty array if type is MLFeatureTypeString
        #[unsafe(method(sequenceWithStringArray:))]
        #[unsafe(method_family = none)]
        pub unsafe fn sequenceWithStringArray(string_values: &NSArray<NSString>) -> Retained<Self>;

        #[unsafe(method(stringValues))]
        #[unsafe(method_family = none)]
        pub unsafe fn stringValues(&self) -> Retained<NSArray<NSString>>;

        /// int64 sequence, propery will be empty array if type is MLFeatureTypeInt64
        #[unsafe(method(sequenceWithInt64Array:))]
        #[unsafe(method_family = none)]
        pub unsafe fn sequenceWithInt64Array(int64_values: &NSArray<NSNumber>) -> Retained<Self>;

        #[unsafe(method(int64Values))]
        #[unsafe(method_family = none)]
        pub unsafe fn int64Values(&self) -> Retained<NSArray<NSNumber>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl MLSequence {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}