Enum inquire::ui::IndexPrefix
source · pub enum IndexPrefix {
None,
Simple,
SpacePadded,
ZeroPadded,
}
Expand description
Definition of index prefixes in option lists.
Variants§
None
Lists of options will not display any hints regarding the position/index of the positions.
Simple
A simple index (1-based) will be displayed before the option string representation.
SpacePadded
A simple index (1-based) will be displayed before the option string representation.
The number representation of the index is padded with
spaces so that the length is the same of the largest
index. That is, if the list has 100 options, the first 9
options will be rendered as " 1", " 2", ...
. Then all
indexes with two digits will be padded with one space, and
finally the last option with index 100 will not need to be
padded.
ZeroPadded
A simple index (1-based) will be displayed before the option string representation.
The number representation of the index is padded with
zeroes so that the length is the same of the largest
index. That is, if the list has 100 options, the first 9
options will be rendered as "001", "002", ...
. Then all
indexes with two digits will be padded with one zero, and
finally the last option with index 100 will not need to be
padded.
Trait Implementations§
source§impl Clone for IndexPrefix
impl Clone for IndexPrefix
source§fn clone(&self) -> IndexPrefix
fn clone(&self) -> IndexPrefix
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for IndexPrefix
impl Debug for IndexPrefix
source§impl PartialEq for IndexPrefix
impl PartialEq for IndexPrefix
source§fn eq(&self, other: &IndexPrefix) -> bool
fn eq(&self, other: &IndexPrefix) -> bool
self
and other
values to be equal, and is used
by ==
.