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