glink/use_stdin
Types
pub type EventEmitter
pub type ReadStream
pub type Stdin {
Stdin(
stdin: ReadStream,
set_raw_mode: fn(Bool) -> Nil,
is_raw_mode_supported: Bool,
internal_exit_on_ctrl_c: Bool,
internal_event_emitter: EventEmitter,
)
}
Constructors
-
Stdin( stdin: ReadStream, set_raw_mode: fn(Bool) -> Nil, is_raw_mode_supported: Bool, internal_exit_on_ctrl_c: Bool, internal_event_emitter: EventEmitter, )Arguments
- stdin
-
Stdin stream passed to
render()inoptions.stdinorprocess.stdinby default. Useful if your app needs to handle user input. NOTE: Not yet useable. - set_raw_mode
-
Ink exposes this function via own
<StdinContext>to be able to handle Ctrl+C, that’s why you should use Ink’sset_raw_mode. If thestdinstream passed to Ink does not supportset_raw_mode, this function does nothing. - is_raw_mode_supported
-
A boolean flag determining if the current
stdinsupportsset_raw_mode. A component usingset_raw_modemight want to useis_raw_mode_supportedto nicely fall back in environments where raw mode is not supported.