objc2_app_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))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct NSDataAsset;
17);
18
19unsafe impl NSCopying for NSDataAsset {}
20
21unsafe impl CopyingHelper for NSDataAsset {
22 type Result = Self;
23}
24
25unsafe impl NSObjectProtocol for NSDataAsset {}
26
27impl NSDataAsset {
28 extern_methods!(
29 #[unsafe(method(init))]
30 #[unsafe(method_family = init)]
31 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33 #[unsafe(method(initWithName:))]
35 #[unsafe(method_family = init)]
36 pub unsafe fn initWithName(
37 this: Allocated<Self>,
38 name: &NSDataAssetName,
39 ) -> Option<Retained<Self>>;
40
41 #[unsafe(method(initWithName:bundle:))]
43 #[unsafe(method_family = init)]
44 pub unsafe fn initWithName_bundle(
45 this: Allocated<Self>,
46 name: &NSDataAssetName,
47 bundle: &NSBundle,
48 ) -> Option<Retained<Self>>;
49
50 #[unsafe(method(name))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn name(&self) -> Retained<NSDataAssetName>;
54
55 #[unsafe(method(data))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn data(&self) -> Retained<NSData>;
59
60 #[unsafe(method(typeIdentifier))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn typeIdentifier(&self) -> Retained<NSString>;
64 );
65}
66
67impl NSDataAsset {
69 extern_methods!(
70 #[unsafe(method(new))]
71 #[unsafe(method_family = new)]
72 pub unsafe fn new() -> Retained<Self>;
73 );
74}