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§
Sourcefn get_text(&self, _webview: WebView, _request: StringRequest)
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.