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§
source§impl 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 Freeze for ClipboardUtil
impl RefUnwindSafe for ClipboardUtil
impl !Send for ClipboardUtil
impl !Sync for ClipboardUtil
impl Unpin for ClipboardUtil
impl UnwindSafe for ClipboardUtil
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more