pub unsafe fn data<D: Copy>(fmt: ClipboardFormat) -> Option<D> {
        use winapi::um::winuser::GetClipboardData;
        use winapi::um::winbase::{GlobalLock, GlobalUnlock};
        use std::{ptr, mem};

        let fmt = fmt.into_raw();
        let handle = GetClipboardData(fmt);
        if handle.is_null() {
            return None;
        }

        let mut data = mem::zeroed();
        ptr::copy_nonoverlapping(GlobalLock(handle) as *const D, &mut data, 1);
        GlobalUnlock(handle);

        Some(data)
    }
/**
        Get the handle to the clipboard data and copy it's data into a new value of type `D`.
        This function is very unsafe because it assumes that the handle points to the correct type.

        The clipboard must be open when calling this function.

        If no data is found with the selected clipboard format, `None` is returned.
    */
Get the handle to the clipboard data and copy it's data into a new value of type `D`.
This function is very unsafe because it assumes that the handle points to the correct type.

The clipboard must be open when calling this function.

If no data is found with the selected clipboard format, `None` is returned.
Get the handle to the clipboard data and copy it ' s data into a new value of type ` D ` . This function is very unsafe because it assumes that the handle points to the correct type . The clipboard must be open when calling this function . If no data is found with the selected clipboard format ` None ` is returned .
pub unsafe fn data<D: Copy>(fmt: ClipboardFormat) -> Option<D> {
        use winapi::um::winuser::GetClipboardData;
        use winapi::um::winbase::{GlobalLock, GlobalUnlock};
        use std::{ptr, mem};
        let fmt = fmt.into_raw();
        let handle = GetClipboardData(fmt);
        if handle.is_null() {
            return None;
        }
        let mut data = mem::zeroed();
        ptr::copy_nonoverlapping(GlobalLock(handle) as *const D, &mut data, 1);
        GlobalUnlock(handle);
        Some(data)
    }
pub unsafe fn data < D : Copy > ( fmt : ClipboardFormat ) -> Option < D > { use winapi :: um :: winuser :: GetClipboardData ; use winapi :: um :: winbase :: { GlobalLock , GlobalUnlock } ; use std :: { ptr , mem } ; let fmt = fmt . into_raw ( ) ; let handle = GetClipboardData ( fmt ) ; if handle . is_null ( ) { return None ; } let mut data = mem :: zeroed ( ) ; ptr :: copy_nonoverlapping ( GlobalLock ( handle ) as * const D , & mut data , 1 ) ; GlobalUnlock ( handle ) ; Some ( data ) }
Get the handle to the clipboard data and copy it's data into a new value of type `D`.
Get the handle to the clipboard data and copy it ' s data into a new value of type ` D ` .
fmt
ClipboardFormat