objc2_multipeer_connectivity/generated/
MCPeerID.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_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/multipeerconnectivity/mcpeerid?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct MCPeerID;
14);
15
16extern_conformance!(
17    unsafe impl NSCoding for MCPeerID {}
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for MCPeerID {}
22);
23
24unsafe impl CopyingHelper for MCPeerID {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for MCPeerID {}
30);
31
32extern_conformance!(
33    unsafe impl NSSecureCoding for MCPeerID {}
34);
35
36impl MCPeerID {
37    extern_methods!(
38        #[unsafe(method(initWithDisplayName:))]
39        #[unsafe(method_family = init)]
40        pub unsafe fn initWithDisplayName(
41            this: Allocated<Self>,
42            my_display_name: &NSString,
43        ) -> Retained<Self>;
44
45        #[unsafe(method(displayName))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn displayName(&self) -> Retained<NSString>;
48    );
49}
50
51/// Methods declared on superclass `NSObject`.
52impl MCPeerID {
53    extern_methods!(
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57
58        #[unsafe(method(new))]
59        #[unsafe(method_family = new)]
60        pub unsafe fn new() -> Retained<Self>;
61    );
62}