pub struct Pasteboard(pub ShareId<Object>);
Expand description

Represents an NSPasteboard, enabling you to handle copy/paste/drag and drop.

Tuple Fields

0: ShareId<Object>

Implementations

Retrieves the system Pasteboard for the given name/type.

Creates and returns a new pasteboard with a name that is guaranteed to be unique with respect to other pasteboards in the system.

A shorthand helper method for copying some text to the clipboard.

Releases the receiver’s resources in the pasteboard server. It’s rare-ish to need to use this, but considering this stuff happens on the Objective-C side you may need it.

Clears the existing contents of the pasteboard.

Looks inside the pasteboard contents and extracts what FileURLs are there, if any.

Note that this method returns a list of Url entities, in an attempt to be closer to how Cocoa & co operate. This method may go away in the future if it’s determined that people wind up just using get_file_paths().

Trait Implementations

Formats the value using the given formatter. Read more

Returns the default system pasteboard (the “general” pasteboard).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.