Trait NSPreviewRepresentableActivityItem

Source
pub unsafe trait NSPreviewRepresentableActivityItem: NSObjectProtocol {
    // Provided methods
    unsafe fn item(&self) -> Retained<AnyObject>
       where Self: Sized + Message { ... }
    unsafe fn title(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    unsafe fn imageProvider(&self) -> Option<Retained<NSItemProvider>>
       where Self: Sized + Message { ... }
    unsafe fn iconProvider(&self) -> Option<Retained<NSItemProvider>>
       where Self: Sized + Message { ... }
}
Available on crate feature NSPreviewRepresentingActivityItem only.
Expand description

Provided Methods§

Source

unsafe fn item(&self) -> Retained<AnyObject>
where Self: Sized + Message,

The item to be shared

Source

unsafe fn title(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

A string representing the name or title of the item to be shared

Source

unsafe fn imageProvider(&self) -> Option<Retained<NSItemProvider>>
where Self: Sized + Message,

Provides an image appropriate to represent the item.

This image typically is a full-size representation of the content being shared. For instance, if sharing a link to a webpage, this might be the hero image on that webpage.

Source

unsafe fn iconProvider(&self) -> Option<Retained<NSItemProvider>>
where Self: Sized + Message,

Provides an icon appropriate to represent the item.

This icon typically is a thumbnail-sized representation of the source of the content. For instance, if sharing a link to a webpage, this might be an icon representing the website overall.

Trait Implementations§

Source§

impl ProtocolType for dyn NSPreviewRepresentableActivityItem

Source§

const NAME: &'static str = "NSPreviewRepresentableActivityItem"

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 NSPreviewRepresentableActivityItem

Implementations on Foreign Types§

Source§

impl<T> NSPreviewRepresentableActivityItem for ProtocolObject<T>

Implementors§