objc2_speech/generated/
SFErrors.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 "C" {
10    /// [Apple's documentation](https://developer.apple.com/documentation/speech/sfspeecherrordomain?language=objc)
11    pub static SFSpeechErrorDomain: &'static NSErrorDomain;
12}
13
14/// [Apple's documentation](https://developer.apple.com/documentation/speech/sfspeecherrorcode?language=objc)
15// NS_ERROR_ENUM
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct SFSpeechErrorCode(pub NSInteger);
19impl SFSpeechErrorCode {
20    /// Error may include `NSUnderlyingErrorKey` in `userInfo`.
21    #[doc(alias = "SFSpeechErrorCodeInternalServiceError")]
22    pub const InternalServiceError: Self = Self(1);
23    /// Failed to read audio file
24    #[doc(alias = "SFSpeechErrorCodeAudioReadFailed")]
25    pub const AudioReadFailed: Self = Self(2);
26    /// Templates were malformed
27    #[doc(alias = "SFSpeechErrorCodeUndefinedTemplateClassName")]
28    pub const UndefinedTemplateClassName: Self = Self(7);
29    /// A custom language model file was malformed
30    #[doc(alias = "SFSpeechErrorCodeMalformedSupplementalModel")]
31    pub const MalformedSupplementalModel: Self = Self(8);
32    /// Operation timed out
33    #[doc(alias = "SFSpeechErrorCodeTimeout")]
34    pub const Timeout: Self = Self(10);
35}
36
37unsafe impl Encode for SFSpeechErrorCode {
38    const ENCODING: Encoding = NSInteger::ENCODING;
39}
40
41unsafe impl RefEncode for SFSpeechErrorCode {
42    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
43}