pub fn new(prompt: String, suggestion: Option<fn(String) -> String>) -> UserInput {

        
        match suggestion {
            Some(s) => UserInput {
                content: with_autocomplete(prompt, s)
            },
            None => UserInput {
                content: get_input(prompt)
            }
        }    
    }
/// Constructor of UserInput
/// prompt is the string that will be displayed before the user input
/// suggestion is a function that takes a string and returns a string
/// if you don't want to use auto complete, pass None
/// 
/// When using auto-complete until the user press enter, the terminal will be in raw mode
/// and the cursor will be in line mode
/// Press `ctrl+c` to exit the raw mode and the cursor will be in block mode
/// Press `ctrl+d` to exit the raw mode and the cursor will be in block mode
/// Press `escape` cancel auto-suggestion for the time being
Constructor of UserInput
prompt is the string that will be displayed before the user input
suggestion is a function that takes a string and returns a string
if you don't want to use auto complete, pass None


Constructor of UserInput prompt is the string that will be displayed before the user input suggestion is a function that takes a string and returns a string if you don ' t want to use auto complete pass None
pub fn new(prompt: String, suggestion: Option<fn(String) -> String>) -> UserInput {
        match suggestion {
            Some(s) => UserInput {
                content: with_autocomplete(prompt, s)
            },
            None => UserInput {
                content: get_input(prompt)
            }
        }    
    }
pub fn new ( prompt : String , suggestion : Option < fn ( String ) -> String > ) -> UserInput { match suggestion { Some ( s ) => UserInput { content : with_autocomplete ( prompt , s ) } , None => UserInput { content : get_input ( prompt ) } } }
Constructor of UserInput
prompt is the string that will be displayed before the user input
suggestion is a function that takes a string and returns a string
if you don't want to use auto complete, pass None
Constructor of UserInput prompt is the string that will be displayed before the user input suggestion is a function that takes a string and returns a string if you don ' t want to use auto complete pass None
prompt
String
suggestion
Option<fn(String) -> String>
prompt
String
suggestion
Option<fn(String) -> String>