objc2_ui_kit/generated/
NSDataAsset.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9pub type NSDataAssetName = NSString;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct NSDataAsset;
20);
21
22unsafe impl Send for NSDataAsset {}
23
24unsafe impl Sync for NSDataAsset {}
25
26extern_conformance!(
27 unsafe impl NSCopying for NSDataAsset {}
28);
29
30unsafe impl CopyingHelper for NSDataAsset {
31 type Result = Self;
32}
33
34extern_conformance!(
35 unsafe impl NSObjectProtocol for NSDataAsset {}
36);
37
38impl NSDataAsset {
39 extern_methods!(
40 #[unsafe(method(init))]
41 #[unsafe(method_family = init)]
42 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
43
44 #[unsafe(method(initWithName:))]
46 #[unsafe(method_family = init)]
47 pub unsafe fn initWithName(
48 this: Allocated<Self>,
49 name: &NSDataAssetName,
50 ) -> Option<Retained<Self>>;
51
52 #[unsafe(method(initWithName:bundle:))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn initWithName_bundle(
56 this: Allocated<Self>,
57 name: &NSDataAssetName,
58 bundle: &NSBundle,
59 ) -> Option<Retained<Self>>;
60
61 #[unsafe(method(name))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn name(&self) -> Retained<NSDataAssetName>;
65
66 #[unsafe(method(data))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn data(&self) -> Retained<NSData>;
70
71 #[unsafe(method(typeIdentifier))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn typeIdentifier(&self) -> Retained<NSString>;
75 );
76}
77
78impl NSDataAsset {
80 extern_methods!(
81 #[unsafe(method(new))]
82 #[unsafe(method_family = new)]
83 pub unsafe fn new() -> Retained<Self>;
84 );
85}