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 objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/virtualization/vzdisksynchronizationmode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct VZDiskSynchronizationMode(pub NSInteger);
impl VZDiskSynchronizationMode {
    /// Perform all synchronization operations as requested by the guest OS.
    ///
    /// With VZDiskSynchronizationModeFull, "flush" and "barrier" commands from the guest
    /// result in their counterpart synchronization commands being sent to the disk implementation.
    #[doc(alias = "VZDiskSynchronizationModeFull")]
    pub const Full: Self = Self(0);
    /// Do not synchronize the data with the permanent storage.
    /// This option does not guarantee data integrity if any error condition occurs such as disk full on the host,
    /// panic, power loss, etc.
    ///
    /// This mode is useful when a virtual machine is only run once to perform a task to completion or failure.
    /// In case of failure, the state of blocks on disk and their order is undefined.
    ///
    /// Using this mode may result in improved performance since no synchronization with the underlying storage is necessary.
    #[doc(alias = "VZDiskSynchronizationModeNone")]
    pub const None: Self = Self(1);
}

unsafe impl Encode for VZDiskSynchronizationMode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for VZDiskSynchronizationMode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}