objc2_sound_analysis/generated/
SNError.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9    /// [Apple's documentation](https://developer.apple.com/documentation/soundanalysis/snerrordomain?language=objc)
10    pub static SNErrorDomain: Option<&'static NSString>;
11}
12
13/// [Apple's documentation](https://developer.apple.com/documentation/soundanalysis/snerrorcode?language=objc)
14// NS_ERROR_ENUM
15#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct SNErrorCode(pub NSInteger);
18impl SNErrorCode {
19    #[doc(alias = "SNErrorCodeUnknownError")]
20    pub const UnknownError: Self = Self(1);
21    #[doc(alias = "SNErrorCodeOperationFailed")]
22    pub const OperationFailed: Self = Self(2);
23    #[doc(alias = "SNErrorCodeInvalidFormat")]
24    pub const InvalidFormat: Self = Self(3);
25    #[doc(alias = "SNErrorCodeInvalidModel")]
26    pub const InvalidModel: Self = Self(4);
27    #[doc(alias = "SNErrorCodeInvalidFile")]
28    pub const InvalidFile: Self = Self(5);
29}
30
31unsafe impl Encode for SNErrorCode {
32    const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35unsafe impl RefEncode for SNErrorCode {
36    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}