objc2-virtualization 0.3.2

Bindings to the Virtualization framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// Configuration of an NVM Express Controller storage device.
    ///
    /// This device configuration creates a storage device that conforms to the NVM Express specification revision 1.1b.
    ///
    /// The device configuration is valid only if used with VZGenericPlatformConfiguration.
    ///
    /// See: VZGenericPlatformConfiguration
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vznvmexpresscontrollerdeviceconfiguration?language=objc)
    #[unsafe(super(VZStorageDeviceConfiguration, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "VZStorageDeviceConfiguration")]
    pub struct VZNVMExpressControllerDeviceConfiguration;
);

#[cfg(feature = "VZStorageDeviceConfiguration")]
extern_conformance!(
    unsafe impl NSCopying for VZNVMExpressControllerDeviceConfiguration {}
);

#[cfg(feature = "VZStorageDeviceConfiguration")]
unsafe impl CopyingHelper for VZNVMExpressControllerDeviceConfiguration {
    type Result = Self;
}

#[cfg(feature = "VZStorageDeviceConfiguration")]
extern_conformance!(
    unsafe impl NSObjectProtocol for VZNVMExpressControllerDeviceConfiguration {}
);

#[cfg(feature = "VZStorageDeviceConfiguration")]
impl VZNVMExpressControllerDeviceConfiguration {
    extern_methods!(
        #[cfg(feature = "VZStorageDeviceAttachment")]
        /// Initialize a VZNVMExpressControllerDeviceConfiguration with a device attachment.
        ///
        /// Parameter `attachment`: The storage device attachment. This defines how the virtualized device operates on the host side.
        ///
        /// See: VZDiskImageStorageDeviceAttachment
        #[unsafe(method(initWithAttachment:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithAttachment(
            this: Allocated<Self>,
            attachment: &VZStorageDeviceAttachment,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `VZStorageDeviceConfiguration`.
#[cfg(feature = "VZStorageDeviceConfiguration")]
impl VZNVMExpressControllerDeviceConfiguration {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}