objc2-multipeer-connectivity 0.3.2

Bindings to the MultipeerConnectivity framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/multipeerconnectivity/mcerrordomain?language=objc)
    pub static MCErrorDomain: Option<&'static NSString>;
}

/// [Apple's documentation](https://developer.apple.com/documentation/multipeerconnectivity/mcerrorcode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MCErrorCode(pub NSInteger);
impl MCErrorCode {
    #[doc(alias = "MCErrorUnknown")]
    pub const Unknown: Self = Self(0);
    #[doc(alias = "MCErrorNotConnected")]
    pub const NotConnected: Self = Self(1);
    #[doc(alias = "MCErrorInvalidParameter")]
    pub const InvalidParameter: Self = Self(2);
    #[doc(alias = "MCErrorUnsupported")]
    pub const Unsupported: Self = Self(3);
    #[doc(alias = "MCErrorTimedOut")]
    pub const TimedOut: Self = Self(4);
    #[doc(alias = "MCErrorCancelled")]
    pub const Cancelled: Self = Self(5);
    #[doc(alias = "MCErrorUnavailable")]
    pub const Unavailable: Self = Self(6);
}

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

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