objc2_ar_kit/generated/
ARObjectAnchor.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-foundation")]
7use objc2_foundation::*;
8
9use crate::*;
10
11#[cfg(feature = "objc2")]
12extern_class!(
13    /// An anchor representing an object in the world.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arobjectanchor?language=objc)
16    #[unsafe(super(ARAnchor, NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    #[cfg(all(feature = "ARAnchor", feature = "objc2"))]
19    pub struct ARObjectAnchor;
20);
21
22#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
23unsafe impl Send for ARObjectAnchor {}
24
25#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
26unsafe impl Sync for ARObjectAnchor {}
27
28#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
29extern_conformance!(
30    unsafe impl ARAnchorCopying for ARObjectAnchor {}
31);
32
33#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
34extern_conformance!(
35    unsafe impl NSCoding for ARObjectAnchor {}
36);
37
38#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
39extern_conformance!(
40    unsafe impl NSCopying for ARObjectAnchor {}
41);
42
43#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
44unsafe impl CopyingHelper for ARObjectAnchor {
45    type Result = Self;
46}
47
48#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
49extern_conformance!(
50    unsafe impl NSObjectProtocol for ARObjectAnchor {}
51);
52
53#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
54extern_conformance!(
55    unsafe impl NSSecureCoding for ARObjectAnchor {}
56);
57
58#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
59impl ARObjectAnchor {
60    extern_methods!(
61        #[cfg(feature = "ARReferenceObject")]
62        /// Reference to the detected object.
63        ///
64        /// This property is not atomic.
65        ///
66        /// # Safety
67        ///
68        /// This might not be thread-safe.
69        #[unsafe(method(referenceObject))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn referenceObject(&self) -> Retained<ARReferenceObject>;
72    );
73}
74
75/// Methods declared on superclass `ARAnchor`.
76#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
77impl ARObjectAnchor {
78    extern_methods!(
79        /// Unavailable
80        #[unsafe(method(init))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new() -> Retained<Self>;
87    );
88}