objc2_multipeer_connectivity/generated/
MCError.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/multipeerconnectivity/mcerrordomain?language=objc)
10    pub static MCErrorDomain: Option<&'static NSString>;
11}
12
13/// [Apple's documentation](https://developer.apple.com/documentation/multipeerconnectivity/mcerrorcode?language=objc)
14// NS_ENUM
15#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct MCErrorCode(pub NSInteger);
18impl MCErrorCode {
19    #[doc(alias = "MCErrorUnknown")]
20    pub const Unknown: Self = Self(0);
21    #[doc(alias = "MCErrorNotConnected")]
22    pub const NotConnected: Self = Self(1);
23    #[doc(alias = "MCErrorInvalidParameter")]
24    pub const InvalidParameter: Self = Self(2);
25    #[doc(alias = "MCErrorUnsupported")]
26    pub const Unsupported: Self = Self(3);
27    #[doc(alias = "MCErrorTimedOut")]
28    pub const TimedOut: Self = Self(4);
29    #[doc(alias = "MCErrorCancelled")]
30    pub const Cancelled: Self = Self(5);
31    #[doc(alias = "MCErrorUnavailable")]
32    pub const Unavailable: Self = Self(6);
33}
34
35unsafe impl Encode for MCErrorCode {
36    const ENCODING: Encoding = NSInteger::ENCODING;
37}
38
39unsafe impl RefEncode for MCErrorCode {
40    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
41}