NSCloudSharingValidation

Trait NSCloudSharingValidation 

Source
pub unsafe trait NSCloudSharingValidation: NSObjectProtocol + MainThreadOnly {
    // Provided method
    unsafe fn cloudShareForUserInterfaceItem(
        &self,
        item: &ProtocolObject<dyn NSValidatedUserInterfaceItem>,
    ) -> Option<Retained<CKShare>>
       where Self: Sized + Message { ... }
}
Available on crate feature NSToolbarItem only.
Expand description

Provided Methods§

Source

unsafe fn cloudShareForUserInterfaceItem( &self, item: &ProtocolObject<dyn NSValidatedUserInterfaceItem>, ) -> Option<Retained<CKShare>>
where Self: Sized + Message,

Available on crate feature NSUserInterfaceValidation and crate feature objc2-cloud-kit and Apple only.

NSToolbarItems created with NSToolbarCloudSharingItemIdentifier use this method for further validation after sending -validateToolbarItem: or -validateUserInterfaceItem:. The validator for the item’s action should return the current CKShare corresponding to the selected item, if any. The state of the item will be changed reflect the state of the CKShare.

Trait Implementations§

Source§

impl ProtocolType for dyn NSCloudSharingValidation

Source§

const NAME: &'static str = "NSCloudSharingValidation"

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 NSCloudSharingValidation

Implementations on Foreign Types§

Source§

impl<T> NSCloudSharingValidation for ProtocolObject<T>

Implementors§