objc2-speech 0.3.2

Bindings to the Speech 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 "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/speech/sfspeecherrordomain?language=objc)
    pub static SFSpeechErrorDomain: &'static NSErrorDomain;
}

/// Error codes that can be thrown under the Speech framework's error domain.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/speech/sfspeecherrorcode?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SFSpeechErrorCode(pub NSInteger);
impl SFSpeechErrorCode {
    /// There was an internal error.
    #[doc(alias = "SFSpeechErrorCodeInternalServiceError")]
    pub const InternalServiceError: Self = Self(1);
    /// The audio file could not be read.
    #[doc(alias = "SFSpeechErrorCodeAudioReadFailed")]
    pub const AudioReadFailed: Self = Self(2);
    /// The custom language model templates were malformed.
    #[doc(alias = "SFSpeechErrorCodeUndefinedTemplateClassName")]
    pub const UndefinedTemplateClassName: Self = Self(7);
    /// The custom language model file was malformed.
    #[doc(alias = "SFSpeechErrorCodeMalformedSupplementalModel")]
    pub const MalformedSupplementalModel: Self = Self(8);
    /// The operation timed out.
    #[doc(alias = "SFSpeechErrorCodeTimeout")]
    pub const Timeout: Self = Self(12);
    /// A required parameter is missing/nil.
    #[doc(alias = "SFSpeechErrorCodeMissingParameter")]
    pub const MissingParameter: Self = Self(13);
}

unsafe impl Encode for SFSpeechErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for SFSpeechErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}