objc2_tv_services/generated/
TVTopShelfItemCollection.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(TVTopShelfObject, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
16 pub struct TVTopShelfItemCollection<Item: ?Sized = AnyObject>;
17);
18
19#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
20impl<Item: ?Sized + Message + AsRef<TVTopShelfItem>> TVTopShelfItemCollection<Item> {
21 #[inline]
27 pub unsafe fn cast_unchecked<NewItem: ?Sized + Message + AsRef<TVTopShelfItem>>(
28 &self,
29 ) -> &TVTopShelfItemCollection<NewItem> {
30 unsafe { &*((self as *const Self).cast()) }
31 }
32}
33
34#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
35extern_conformance!(
36 unsafe impl<Item: ?Sized + AsRef<TVTopShelfItem>> NSObjectProtocol
37 for TVTopShelfItemCollection<Item>
38 {
39 }
40);
41
42#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
43impl<Item: Message + AsRef<TVTopShelfItem>> TVTopShelfItemCollection<Item> {
44 extern_methods!(
45 #[unsafe(method(items))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn items(&self) -> Retained<NSArray<Item>>;
49
50 #[unsafe(method(initWithItems:))]
52 #[unsafe(method_family = init)]
53 pub unsafe fn initWithItems(this: Allocated<Self>, items: &NSArray<Item>)
54 -> Retained<Self>;
55 );
56}
57
58#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
60impl<Item: Message + AsRef<TVTopShelfItem>> TVTopShelfItemCollection<Item> {
61 extern_methods!(
62 #[unsafe(method(init))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
65
66 #[unsafe(method(new))]
67 #[unsafe(method_family = new)]
68 pub unsafe fn new() -> Retained<Self>;
69 );
70}