Trait VZVirtualMachineDelegate

Source
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 { ... }
}
Available on crate feature 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§

Source

unsafe fn guestDidStopVirtualMachine(&self, virtual_machine: &VZVirtualMachine)
where Self: Sized + Message,

Available on crate feature VZVirtualMachine only.

Invoked when a guest has stopped the virtual machine.

Parameter virtualMachine: The virtual machine invoking the delegate method.

Source

unsafe fn virtualMachine_didStopWithError( &self, virtual_machine: &VZVirtualMachine, error: &NSError, )
where Self: Sized + Message,

Available on crate feature 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.

Source

unsafe fn virtualMachine_networkDevice_attachmentWasDisconnectedWithError( &self, virtual_machine: &VZVirtualMachine, network_device: &VZNetworkDevice, error: &NSError, )
where Self: Sized + Message,

Available on crate features 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.

Trait Implementations§

Source§

impl ProtocolType for dyn VZVirtualMachineDelegate

Source§

const NAME: &'static str = "VZVirtualMachineDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn VZVirtualMachineDelegate

Implementations on Foreign Types§

Source§

impl<T> VZVirtualMachineDelegate for ProtocolObject<T>

Implementors§