This commit is contained in:
Jonas Kruckenberg 2022-11-01 16:38:29 +01:00
parent 6b5376d756
commit b9751a018f
4 changed files with 22 additions and 22 deletions

View file

@ -1,10 +1,10 @@
/// Gets the clipboard content as plain text.
///
///
/// # Example
///
///
/// ```rust,no_run
/// use tauri_api::clipboard::read_text;
///
///
/// let clipboard_text = read_text().await;
/// ```
#[inline(always)]
@ -13,12 +13,12 @@ pub async fn read_text() -> Option<String> {
}
/// Writes plain text to the clipboard.
///
///
/// # Example
///
///
/// ```rust,no_run
/// use tauri_api::clipboard::{write_text, read_text};
///
///
/// write_text("Tauri is awesome!").await;
/// assert_eq!(read_text().await, "Tauri is awesome!");
/// ```
@ -37,4 +37,4 @@ mod inner {
pub async fn readText() -> JsValue;
pub async fn writeText(text: &str);
}
}
}