]> git.proxmox.com Git - rustc.git/blob - vendor/console/src/wasm_term.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / vendor / console / src / wasm_term.rs
1 use std::fmt::Display;
2 use std::io;
3
4 use crate::kb::Key;
5 use crate::term::Term;
6
7 pub use crate::common_term::*;
8
9 pub const DEFAULT_WIDTH: u16 = 80;
10
11 #[inline]
12 pub fn is_a_terminal(_out: &Term) -> bool {
13 false
14 }
15
16 #[inline]
17 pub fn is_a_color_terminal(out: &Term) -> bool {
18 false
19 }
20
21 #[inline]
22 pub fn terminal_size() -> Option<(u16, u16)> {
23 None
24 }
25
26 pub fn read_secure() -> io::Result<String> {
27 Err(io::Error::new(
28 io::ErrorKind::Other,
29 "unsupported operation",
30 ))
31 }
32
33 pub fn read_single_key() -> io::Result<Key> {
34 Err(io::Error::new(
35 io::ErrorKind::Other,
36 "unsupported operation",
37 ))
38 }
39
40 #[inline]
41 pub fn wants_emoji() -> bool {
42 false
43 }
44
45 pub fn set_title<T: Display>(_title: T) {}