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/// Error codes that can be thrown under the Speech framework's error domain.
15///
16/// See also [Apple's documentation](https://developer.apple.com/documentation/speech/sfspeecherrorcode?language=objc)
17// NS_ERROR_ENUM
18#[repr(transparent)]
19#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
20pub struct SFSpeechErrorCode(pub NSInteger);
21impl SFSpeechErrorCode {
22    /// There was an internal error.
23    #[doc(alias = "SFSpeechErrorCodeInternalServiceError")]
24    pub const InternalServiceError: Self = Self(1);
25    /// The audio file could not be read.
26    #[doc(alias = "SFSpeechErrorCodeAudioReadFailed")]
27    pub const AudioReadFailed: Self = Self(2);
28    /// The custom language model templates were malformed.
29    #[doc(alias = "SFSpeechErrorCodeUndefinedTemplateClassName")]
30    pub const UndefinedTemplateClassName: Self = Self(7);
31    /// The custom language model file was malformed.
32    #[doc(alias = "SFSpeechErrorCodeMalformedSupplementalModel")]
33    pub const MalformedSupplementalModel: Self = Self(8);
34    /// The operation timed out.
35    #[doc(alias = "SFSpeechErrorCodeTimeout")]
36    pub const Timeout: Self = Self(12);
37    /// A required parameter is missing/nil.
38    #[doc(alias = "SFSpeechErrorCodeMissingParameter")]
39    pub const MissingParameter: Self = Self(13);
40}
41
42unsafe impl Encode for SFSpeechErrorCode {
43    const ENCODING: Encoding = NSInteger::ENCODING;
44}
45
46unsafe impl RefEncode for SFSpeechErrorCode {
47    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
48}