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
19extern_conformance!(
20 unsafe impl NSCopying for NSDataAsset {}
21);
22
23unsafe impl CopyingHelper for NSDataAsset {
24 type Result = Self;
25}
26
27extern_conformance!(
28 unsafe impl NSObjectProtocol for NSDataAsset {}
29);
30
31impl NSDataAsset {
32 extern_methods!(
33 #[unsafe(method(init))]
34 #[unsafe(method_family = init)]
35 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37 #[unsafe(method(initWithName:))]
39 #[unsafe(method_family = init)]
40 pub unsafe fn initWithName(
41 this: Allocated<Self>,
42 name: &NSDataAssetName,
43 ) -> Option<Retained<Self>>;
44
45 #[unsafe(method(initWithName:bundle:))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn initWithName_bundle(
49 this: Allocated<Self>,
50 name: &NSDataAssetName,
51 bundle: &NSBundle,
52 ) -> Option<Retained<Self>>;
53
54 #[unsafe(method(name))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn name(&self) -> Retained<NSDataAssetName>;
58
59 #[unsafe(method(data))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn data(&self) -> Retained<NSData>;
63
64 #[unsafe(method(typeIdentifier))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn typeIdentifier(&self) -> Retained<NSString>;
68 );
69}
70
71impl NSDataAsset {
73 extern_methods!(
74 #[unsafe(method(new))]
75 #[unsafe(method_family = new)]
76 pub unsafe fn new() -> Retained<Self>;
77 );
78}