Struct sdl2::clipboard::ClipboardUtil
source · pub struct ClipboardUtil { /* private fields */ }
Expand description
Clipboard utility functions. Access with VideoSubsystem::clipboard()
.
These functions require the video subsystem to be initialized.
let sdl_context = sdl2::init().unwrap();
let video_subsystem = sdl_context.video().unwrap();
video_subsystem.clipboard().set_clipboard_text("Hello World!").unwrap();
Implementations
sourceimpl ClipboardUtil
impl ClipboardUtil
pub fn set_clipboard_text(&self, text: &str) -> Result<(), String>
pub fn clipboard_text(&self) -> Result<String, String>
pub fn has_clipboard_text(&self) -> bool
Auto Trait Implementations
impl RefUnwindSafe for ClipboardUtil
impl !Send for ClipboardUtil
impl !Sync for ClipboardUtil
impl Unpin for ClipboardUtil
impl UnwindSafe for ClipboardUtil
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more