Skip to main content

NSPreviewRepresentableActivityItem

Trait NSPreviewRepresentableActivityItem 

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

Provided Methods§

Source

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

The item to be shared

Source

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

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

Source

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

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<T> ImplementedBy<T> for dyn NSPreviewRepresentableActivityItem

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

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> NSPreviewRepresentableActivityItem for ProtocolObject<T>

Implementors§