pub struct ContextBuilder { /* private fields */ }
Expand description
A builder for Context
.
Implementations§
Source§impl ContextBuilder
impl ContextBuilder
Sourcepub fn name_prefix<S: Into<String>>(self, prefix: S) -> Self
pub fn name_prefix<S: Into<String>>(self, prefix: S) -> Self
Adds an option name prefix to the context.
Sourcepub fn alias_prefix<S: Into<String>>(self, prefix: S) -> Self
pub fn alias_prefix<S: Into<String>>(self, prefix: S) -> Self
Adds a option alias prefix to the context.
Sourcepub fn assign_operator(self, value: char) -> Self
pub fn assign_operator(self, value: char) -> Self
Adds an assign operator for this context.
Sourcepub fn suggestions(self, suggestions: SuggestionSource) -> Self
pub fn suggestions(self, suggestions: SuggestionSource) -> Self
Sets the SuggestionSource
for this context.
Sourcepub fn help(self, help: HelpSource) -> Self
pub fn help(self, help: HelpSource) -> Self
Sets the HelpSource
for this context.
Sourcepub fn help_option(self, option: CommandOption) -> Self
pub fn help_option(self, option: CommandOption) -> Self
Sets the help CommandOption
for this context.
Sourcepub fn help_command(self, command: Command) -> Self
pub fn help_command(self, command: Command) -> Self
Sets the help Command
for this context.
Sourcepub fn version_option(self, option: CommandOption) -> Self
pub fn version_option(self, option: CommandOption) -> Self
Sets the version CommandOption
for this context.
Sourcepub fn version_command(self, command: Command) -> Self
pub fn version_command(self, command: Command) -> Self
Sets the version Command
for this context.
Trait Implementations§
Source§impl Clone for ContextBuilder
impl Clone for ContextBuilder
Source§fn clone(&self) -> ContextBuilder
fn clone(&self) -> ContextBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ContextBuilder
impl !RefUnwindSafe for ContextBuilder
impl !Send for ContextBuilder
impl !Sync for ContextBuilder
impl Unpin for ContextBuilder
impl !UnwindSafe for ContextBuilder
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