pub trait ClipSource {
// Required method
fn copy(&self, app: &AppHandle) -> Option<ClipItem>;
// Provided methods
fn copy_element(
&self,
app: &AppHandle,
element: Option<&str>,
) -> Option<ClipItem> { ... }
fn can_copy(&self, _app: &AppHandle) -> bool { ... }
fn can_cut(&self, _app: &AppHandle) -> bool { ... }
fn delete(&self, _app: &AppHandle, _cut: &Cut<'_>) -> Result<(), String> { ... }
}Expand description
What a copy takes from a component.
Required Methods§
Provided Methods§
Sourcefn copy_element(
&self,
app: &AppHandle,
element: Option<&str>,
) -> Option<ClipItem>
fn copy_element( &self, app: &AppHandle, element: Option<&str>, ) -> Option<ClipItem>
What a copy takes from one element of the endpoint (a node, a
row: the key its widget was bound with, bind_element, or the
one a request named); by default ClipSource::copy, whatever
the element.
Sourcefn can_copy(&self, _app: &AppHandle) -> bool
fn can_copy(&self, _app: &AppHandle) -> bool
Whether a copy would take something now (canCopy).