Trait VZNetworkBlockDeviceStorageDeviceAttachmentDelegate

Source
pub unsafe trait VZNetworkBlockDeviceStorageDeviceAttachmentDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn attachmentWasConnected(
        &self,
        attachment: &VZNetworkBlockDeviceStorageDeviceAttachment,
    )
       where Self: Sized + Message { ... }
    unsafe fn attachment_didEncounterError(
        &self,
        attachment: &VZNetworkBlockDeviceStorageDeviceAttachment,
        error: &NSError,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature VZNetworkBlockDeviceStorageDeviceAttachment only.
Expand description

A class conforming to VZNetworkBlockDeviceStorageDeviceAttachmentDelegate can provide methods for tracking the attachment’s state.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn attachmentWasConnected( &self, attachment: &VZNetworkBlockDeviceStorageDeviceAttachment, )
where Self: Sized + Message,

Available on crate feature VZStorageDeviceAttachment only.

Invoked when the NBD client has successfully connected/reconnected with the server.

Parameter attachment: The attachment object invoking the delegate method.

Connection with the server will take place when the virtual machine is first started, and reconnection attempts will take place when the connection times out or when the NBD client has encountered a recoverable error, such as an I/O error from the server. The method may be invoked multiple times during a virtual machine’s life cycle. Reconnections are transparent to the guest.

Source

unsafe fn attachment_didEncounterError( &self, attachment: &VZNetworkBlockDeviceStorageDeviceAttachment, error: &NSError, )
where Self: Sized + Message,

Available on crate feature VZStorageDeviceAttachment only.

Invoked when the NBD client has encountered a non-recoverable error.

Parameter attachment: The attachment object invoking the delegate method.

Parameter error: The error.

The NBD client will be in a non-functional state after this method is invoked.

Trait Implementations§

Source§

impl ProtocolType for dyn VZNetworkBlockDeviceStorageDeviceAttachmentDelegate

Source§

const NAME: &'static str = "VZNetworkBlockDeviceStorageDeviceAttachmentDelegate"

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 VZNetworkBlockDeviceStorageDeviceAttachmentDelegate

Implementations on Foreign Types§

Source§

impl<T> VZNetworkBlockDeviceStorageDeviceAttachmentDelegate for ProtocolObject<T>

Implementors§