use crate::platform::{get_platform, Platform};
pub struct ClipboardManager;
impl ClipboardManager {
pub fn set_text(text: impl AsRef<str>) -> bool {
Self::set_text_with(get_platform(), text.as_ref())
}
pub fn text() -> String {
Self::text_with(get_platform())
}
pub(crate) fn set_text_with(platform: &dyn Platform, text: &str) -> bool {
platform.set_clipboard_text(text)
}
pub(crate) fn text_with(platform: &dyn Platform) -> String {
platform.get_clipboard_text()
}
}