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.