Trait ClipboardDelegate

Source
pub trait ClipboardDelegate {
    // Provided methods
    fn clear(&self, _webview: WebView) { ... }
    fn get_text(&self, _webview: WebView, _request: StringRequest) { ... }
    fn set_text(&self, _webview: WebView, _new_contents: String) { ... }
}
Expand description

A delegate that is responsible for accessing the system clipboard. On Mac, Windows, and Linux if the clipboard feature is enabled, a default delegate is automatically used that implements clipboard support. An embedding application can override this delegate by using this trait.

Provided Methods§

Source

fn clear(&self, _webview: WebView)

A request to clear all contents of the system clipboard.

Source

fn get_text(&self, _webview: WebView, _request: StringRequest)

A request to get the text contents of the system clipboard. Once the contents are retrieved the embedder should call StringRequest::success with the text or StringRequest::failure with a failure message.

Source

fn set_text(&self, _webview: WebView, _new_contents: String)

A request to set the text contents of the system clipboard to new_contents.

Implementors§