pub unsafe trait VZVirtualMachineDelegate: NSObjectProtocol {
// Provided methods
unsafe fn guestDidStopVirtualMachine(
&self,
virtual_machine: &VZVirtualMachine,
)
where Self: Sized + Message { ... }
unsafe fn virtualMachine_didStopWithError(
&self,
virtual_machine: &VZVirtualMachine,
error: &NSError,
)
where Self: Sized + Message { ... }
unsafe fn virtualMachine_networkDevice_attachmentWasDisconnectedWithError(
&self,
virtual_machine: &VZVirtualMachine,
network_device: &VZNetworkDevice,
error: &NSError,
)
where Self: Sized + Message { ... }
}
VZVirtualMachineDelegate
only.Expand description
A class conforming to the VZVirtualMachineDelegate protocol can provide methods for tracking the virtual machine state.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn guestDidStopVirtualMachine(&self, virtual_machine: &VZVirtualMachine)
Available on crate feature VZVirtualMachine
only.
unsafe fn guestDidStopVirtualMachine(&self, virtual_machine: &VZVirtualMachine)
VZVirtualMachine
only.Invoked when a guest has stopped the virtual machine.
Parameter virtualMachine
: The virtual machine invoking the delegate method.
Sourceunsafe fn virtualMachine_didStopWithError(
&self,
virtual_machine: &VZVirtualMachine,
error: &NSError,
)
Available on crate feature VZVirtualMachine
only.
unsafe fn virtualMachine_didStopWithError( &self, virtual_machine: &VZVirtualMachine, error: &NSError, )
VZVirtualMachine
only.Invoked when a virtual machine is stopped due to an error.
Parameter virtualMachine
: The virtual machine invoking the delegate method.
Parameter error
: The error.
Sourceunsafe fn virtualMachine_networkDevice_attachmentWasDisconnectedWithError(
&self,
virtual_machine: &VZVirtualMachine,
network_device: &VZNetworkDevice,
error: &NSError,
)
Available on crate features VZNetworkDevice
and VZVirtualMachine
only.
unsafe fn virtualMachine_networkDevice_attachmentWasDisconnectedWithError( &self, virtual_machine: &VZVirtualMachine, network_device: &VZNetworkDevice, error: &NSError, )
VZNetworkDevice
and VZVirtualMachine
only.Invoked when a virtual machine’s network attachment has been disconnected.
This method is invoked every time that the network interface fails to start, resulting in the network attachment being disconnected. This can happen in many situations such as initial boot, device reset, reboot, etc. Therefore, this method may be invoked several times during a virtual machine’s life cycle.
The VZNetworkDevice.attachment property will be nil after the method is invoked.
Parameter virtualMachine
: The virtual machine invoking the delegate method.
Parameter networkDevice
: The network device whose attachment was disconnected.
Parameter error
: The error.