pub fn create() -> ScreenBuffer {
        let mut security_attr: SECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES {
            nLength: size_of::<SECURITY_ATTRIBUTES>() as u32,
            lpSecurityDescriptor: NULL,
            bInheritHandle: TRUE,
        };

        unsafe {
            let new_screen_buffer = CreateConsoleScreenBuffer(
                GENERIC_READ |           // read/write access
                    GENERIC_WRITE,
                FILE_SHARE_READ | FILE_SHARE_WRITE, // shared
                &mut security_attr,                 // default security attributes
                CONSOLE_TEXTMODE_BUFFER,            // must be TEXTMODE
                NULL,
            );
            ScreenBuffer {
                handle: Handle::from_raw(new_screen_buffer),
            }
        }
    }
/// Create new console screen buffer.
///
/// Wraps the underlying function call: [CreateConsoleScreenBuffer]
/// link: [https://docs.microsoft.com/en-us/windows/console/createconsolescreenbuffer]

Create new console screen buffer.
Create new console screen buffer .
pub fn create() -> ScreenBuffer {
        let mut security_attr: SECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES {
            nLength: size_of::<SECURITY_ATTRIBUTES>() as u32,
            lpSecurityDescriptor: NULL,
            bInheritHandle: TRUE,
        };
        unsafe {
            let new_screen_buffer = CreateConsoleScreenBuffer(
                GENERIC_READ |           // read/write access
                    GENERIC_WRITE,
                FILE_SHARE_READ | FILE_SHARE_WRITE, // shared
                &mut security_attr,                 // default security attributes
                CONSOLE_TEXTMODE_BUFFER,            // must be TEXTMODE
                NULL,
            );
            ScreenBuffer {
                handle: Handle::from_raw(new_screen_buffer),
            }
        }
    }
pub fn create ( ) -> ScreenBuffer { let mut security_attr : SECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES { nLength : size_of :: < SECURITY_ATTRIBUTES > ( ) as u32 , lpSecurityDescriptor : NULL , bInheritHandle : TRUE , } ; unsafe { let new_screen_buffer = CreateConsoleScreenBuffer ( GENERIC_READ | // read/write access
 GENERIC_WRITE , FILE_SHARE_READ | FILE_SHARE_WRITE , // shared
 & mut security_attr , // default security attributes
 CONSOLE_TEXTMODE_BUFFER , // must be TEXTMODE
 NULL , ) ; ScreenBuffer { handle : Handle :: from_raw ( new_screen_buffer ) , } } }
Create new console screen buffer.
Create new console screen buffer .