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 the Virtio socket device.
    ///
    /// This configuration creates a Virtio socket device for the guest which communicates with the host through the Virtio interface.
    ///
    /// Only one Virtio socket device can be used per virtual machine.
    ///
    /// See: VZVirtioSocketDevice
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzvirtiosocketdeviceconfiguration?language=objc)
    #[unsafe(super(VZSocketDeviceConfiguration, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "VZSocketDeviceConfiguration")]
    pub struct VZVirtioSocketDeviceConfiguration;
);

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

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

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

#[cfg(feature = "VZSocketDeviceConfiguration")]
impl VZVirtioSocketDeviceConfiguration {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

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