Enum cargo_lambda_interactive::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
sourceimpl Clone for IndexPrefix
impl Clone for IndexPrefix
sourcefn clone(&self) -> IndexPrefix
fn clone(&self) -> IndexPrefix
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for IndexPrefix
impl Debug for IndexPrefix
sourceimpl PartialEq<IndexPrefix> for IndexPrefix
impl PartialEq<IndexPrefix> for IndexPrefix
impl Copy for IndexPrefix
impl StructuralPartialEq for IndexPrefix
Auto Trait Implementations
impl RefUnwindSafe for IndexPrefix
impl Send for IndexPrefix
impl Sync for IndexPrefix
impl Unpin for IndexPrefix
impl UnwindSafe for IndexPrefix
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more