Skip to main content

NSCloudSharingValidation

Trait NSCloudSharingValidation 

Source
pub unsafe trait NSCloudSharingValidation: NSObjectProtocol + MainThreadOnly {
    // Provided method
    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

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

Available on Apple and crate feature NSUserInterfaceValidation and crate feature objc2-cloud-kit 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<T> ImplementedBy<T> for dyn NSCloudSharingValidation

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> NSCloudSharingValidation for ProtocolObject<T>

Implementors§