pub struct Boolean(/* private fields */);
Expand description
Boolean capability names.
The names are used as indices into a Desc
.
Name | Short name |
---|---|
auto_left_margin | bw |
auto_right_margin | am |
no_esc_ctlc | xsb |
ceol_standout_glitch | xhp |
eat_newline_glitch | xenl |
erase_overstrike | eo |
generic_type | gn |
hard_copy | hc |
has_meta_key | km |
has_status_line | hs |
insert_null_glitch | in_ |
memory_above | db |
memory_below | da |
move_insert_mode | mir |
move_standout_mode | msgr |
over_strike | os |
status_line_esc_ok | eslok |
dest_tabs_magic_smso | xt |
tilde_glitch | hz |
transparent_underline | ul |
xon_xoff | xon |
needs_xon_xoff | nxon |
prtr_silent | mc5i |
hard_cursor | chts |
non_rev_rmcup | nrrmc |
no_pad_char | npc |
non_dest_scroll_region | ndscr |
can_change | ccc |
back_color_erase | bce |
hue_lightness_saturation | hls |
col_addr_glitch | xhpa |
cr_cancels_micro_mode | crxm |
has_print_wheel | daisy |
row_addr_glitch | xvpa |
semi_auto_right_margin | sam |
cpi_changes_res | cpix |
lpi_changes_res | lpix |
backspaces_with_bs | OTbs_b |
crt_no_scrolling | OTns |
no_correctly_working_cr | OTnc |
gnu_has_meta_key | OTMT |
linefeed_is_newline | OTNL |
has_hardware_tabs | OTpt |
return_does_clr_eol | OTxr |
Implementations§
Source§impl Boolean
impl Boolean
Sourcepub fn named<T: Borrow<str>>(name: T) -> Option<Boolean>
pub fn named<T: Borrow<str>>(name: T) -> Option<Boolean>
The Boolean
capabilitiy name corresponding to the string
name
.
Sourcepub fn iter() -> BoolIter ⓘ
pub fn iter() -> BoolIter ⓘ
An iterator over the predefined boolean capabilities.
Examples found in repository?
examples/dumpinfo.rs (line 11)
5fn main() {
6 let desc = Desc::current();
7 let names = desc.names();
8 if names.len() > 0 {
9 println!("{}", names[0]);
10 }
11 for b in cap::Boolean::iter() {
12 if desc[b] {
13 println!("{}", b.short_name());
14 }
15 }
16 for b in desc.bool_exts() {
17 if desc.get_bool_ext(b) {
18 println!("* {}", b.name());
19 }
20 }
21 for n in cap::Number::iter() {
22 if desc[n] != 0xffff {
23 println!("{}#{}", n.short_name(), desc[n]);
24 }
25 }
26 for n in desc.num_exts() {
27 if desc.get_num_ext(n) != 0xffff {
28 println!("* {}#{}", n.name(), desc.get_num_ext(n));
29 }
30 }
31 for s in cap::String::iter() {
32 if &desc[s] != b"" {
33 println!("{}={}", s.short_name(), show(&desc[s]));
34 }
35 }
36 for s in desc.str_exts() {
37 if desc.get_str_ext(s) != b"" {
38 println!("* {}={}", s.name(), show(desc.get_str_ext(s)));
39 }
40 }
41}
Sourcepub fn short_name(&self) -> &'static str
pub fn short_name(&self) -> &'static str
The short name of the capability.
Examples found in repository?
examples/dumpinfo.rs (line 13)
5fn main() {
6 let desc = Desc::current();
7 let names = desc.names();
8 if names.len() > 0 {
9 println!("{}", names[0]);
10 }
11 for b in cap::Boolean::iter() {
12 if desc[b] {
13 println!("{}", b.short_name());
14 }
15 }
16 for b in desc.bool_exts() {
17 if desc.get_bool_ext(b) {
18 println!("* {}", b.name());
19 }
20 }
21 for n in cap::Number::iter() {
22 if desc[n] != 0xffff {
23 println!("{}#{}", n.short_name(), desc[n]);
24 }
25 }
26 for n in desc.num_exts() {
27 if desc.get_num_ext(n) != 0xffff {
28 println!("* {}#{}", n.name(), desc.get_num_ext(n));
29 }
30 }
31 for s in cap::String::iter() {
32 if &desc[s] != b"" {
33 println!("{}={}", s.short_name(), show(&desc[s]));
34 }
35 }
36 for s in desc.str_exts() {
37 if desc.get_str_ext(s) != b"" {
38 println!("* {}={}", s.name(), show(desc.get_str_ext(s)));
39 }
40 }
41}
Trait Implementations§
impl Copy for Boolean
Auto Trait Implementations§
impl Freeze for Boolean
impl RefUnwindSafe for Boolean
impl Send for Boolean
impl Sync for Boolean
impl Unpin for Boolean
impl UnwindSafe for Boolean
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more