Enum bpaf::CompleteDecor
source · [−]Expand description
Various complete options decorations
Somewhat work in progress, only makes a difference in zsh
Combinatoric usage
fn pair() -> impl Parser<(bool, bool)> {
let a = short('a').switch();
let b = short('b').switch();
construct!(a, b)
.complete_style(CompleteDecor::VisibleGroup("a and b"))
}
Derive usage
#[derive(Debug, Clone, Bpaf)]
#[bpaf(complete_style(CompleteDecor::VisibleGroup("a and b")))]
struct Options {
a: bool,
b: bool,
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
HiddenGroup(&'static str)
Group items according to this group
VisibleGroup(&'static str)
Group items according to this group but also show the group name
Trait Implementations
sourceimpl Clone for CompleteDecor
impl Clone for CompleteDecor
sourcefn clone(&self) -> CompleteDecor
fn clone(&self) -> CompleteDecor
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 moresourceimpl Debug for CompleteDecor
impl Debug for CompleteDecor
impl Copy for CompleteDecor
Auto Trait Implementations
impl RefUnwindSafe for CompleteDecor
impl Send for CompleteDecor
impl Sync for CompleteDecor
impl Unpin for CompleteDecor
impl UnwindSafe for CompleteDecor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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