Struct clipboard_win::Clipboard
source · pub struct Clipboard { /* private fields */ }
Expand description
Clipboard instance, which allows to perform clipboard ops.
§Note:
You can have only one such instance across your program.
§Warning:
In Windows Clipboard opens globally and only one application can set data onto format at the time.
Therefore as soon as operations are finished, user is advised to close Clipboard.
Implementations§
source§impl Clipboard
impl Clipboard
sourcepub fn new() -> SysResult<Self>
pub fn new() -> SysResult<Self>
Attempts to open clipboard, returning clipboard instance on success.
sourcepub fn new_for(owner: HWND) -> SysResult<Self>
pub fn new_for(owner: HWND) -> SysResult<Self>
Attempts to open clipboard, associating it with specified owner
and returning clipboard instance on success.
sourcepub fn new_attempts(num: usize) -> SysResult<Self>
pub fn new_attempts(num: usize) -> SysResult<Self>
Attempts to open clipboard, giving it num
retries in case of failure.
sourcepub fn new_attempts_for(owner: HWND, num: usize) -> SysResult<Self>
pub fn new_attempts_for(owner: HWND, num: usize) -> SysResult<Self>
Attempts to open clipboard, giving it num
retries in case of failure.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clipboard
impl RefUnwindSafe for Clipboard
impl Send for Clipboard
impl Sync for Clipboard
impl Unpin for Clipboard
impl UnwindSafe for Clipboard
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