objc2_virtualization/generated/
VZStorageDeviceConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Base class for a storage device configuration.
11    ///
12    /// VZStorageDeviceConfiguration should not be instantiated directly.
13    /// One of its subclasses like VZVirtioBlockDeviceConfiguration should be used instead.
14    ///
15    ///
16    /// See: VZNVMExpressControllerDeviceConfiguration
17    ///
18    /// See: VZUSBMassStorageDeviceConfiguration
19    ///
20    /// See: VZVirtioBlockDeviceConfiguration
21    ///
22    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzstoragedeviceconfiguration?language=objc)
23    #[unsafe(super(NSObject))]
24    #[derive(Debug, PartialEq, Eq, Hash)]
25    pub struct VZStorageDeviceConfiguration;
26);
27
28extern_conformance!(
29    unsafe impl NSCopying for VZStorageDeviceConfiguration {}
30);
31
32unsafe impl CopyingHelper for VZStorageDeviceConfiguration {
33    type Result = Self;
34}
35
36extern_conformance!(
37    unsafe impl NSObjectProtocol for VZStorageDeviceConfiguration {}
38);
39
40impl VZStorageDeviceConfiguration {
41    extern_methods!(
42        #[unsafe(method(new))]
43        #[unsafe(method_family = new)]
44        pub unsafe fn new() -> Retained<Self>;
45
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[cfg(feature = "VZStorageDeviceAttachment")]
51        /// Storage device attachment. Defines what local resource is exposed to the virtual machine as a disk.
52        ///
53        /// See: VZDiskImageStorageDeviceAttachment
54        #[unsafe(method(attachment))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn attachment(&self) -> Retained<VZStorageDeviceAttachment>;
57    );
58}