pub enum GpuEjectPolicy {
Relaunch,
Wait,
Kill,
Ignore,
}Expand description
GPU Eject Policy
Variants§
Relaunch
Set this value to allow macOS to quit and relaunch your app with another GPU. Your app can implement the application(:willEncodeRestorableState:) method to save any state before it quits, and it can implement the application(:didDecodeRestorableState:) method to restore any saved state after it relaunches.
Wait
Set this value to manually respond to the safe disconnect request. Your app must register and respond to the removalRequested notification posted by Metal. macOS waits for your app to remove all references to the external GPU before notifying the user that it’s safe to disconnect the GPU.
Kill
Set this value to allow macOS to force your app to quit.
Ignore
Tells the system to ignore the disconnect message. Don’t use this key in new macOS apps.
Trait Implementations§
Source§impl Clone for GpuEjectPolicy
impl Clone for GpuEjectPolicy
Source§fn clone(&self) -> GpuEjectPolicy
fn clone(&self) -> GpuEjectPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GpuEjectPolicy
impl Debug for GpuEjectPolicy
Source§impl<'de> Deserialize<'de> for GpuEjectPolicy
impl<'de> Deserialize<'de> for GpuEjectPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GpuEjectPolicy
impl PartialEq for GpuEjectPolicy
Source§impl Serialize for GpuEjectPolicy
impl Serialize for GpuEjectPolicy
impl Eq for GpuEjectPolicy
impl StructuralPartialEq for GpuEjectPolicy
Auto Trait Implementations§
impl Freeze for GpuEjectPolicy
impl RefUnwindSafe for GpuEjectPolicy
impl Send for GpuEjectPolicy
impl Sync for GpuEjectPolicy
impl Unpin for GpuEjectPolicy
impl UnwindSafe for GpuEjectPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.