pub struct CmdInfosBuilder(/* private fields */);Implementations§
Source§impl CmdInfosBuilder
impl CmdInfosBuilder
Sourcepub fn args<S, I>(&mut self, iter: I) -> &mut CmdInfosBuilder
pub fn args<S, I>(&mut self, iter: I) -> &mut CmdInfosBuilder
Command arguments.
Sourcepub fn bang(&mut self, bang: bool) -> &mut CmdInfosBuilder
pub fn bang(&mut self, bang: bool) -> &mut CmdInfosBuilder
Whether the command contains a <bang> (!) modifier.
Sourcepub fn cmd(&mut self, cmd: impl Into<String>) -> &mut CmdInfosBuilder
pub fn cmd(&mut self, cmd: impl Into<String>) -> &mut CmdInfosBuilder
Command name.
Sourcepub fn count(&mut self, count: u32) -> &mut CmdInfosBuilder
pub fn count(&mut self, count: u32) -> &mut CmdInfosBuilder
Any count that was supplied to the command. None if command cannot
take a count.
pub fn magic(&mut self, magic: CmdMagic) -> &mut CmdInfosBuilder
pub fn mods(&mut self, mods: CommandModifiers) -> &mut CmdInfosBuilder
Sourcepub fn nargs(&mut self, nargs: CommandNArgs) -> &mut CmdInfosBuilder
pub fn nargs(&mut self, nargs: CommandNArgs) -> &mut CmdInfosBuilder
Value of :command-nargs
Sourcepub fn nextcmd(&mut self, nextcmd: impl Into<String>) -> &mut CmdInfosBuilder
pub fn nextcmd(&mut self, nextcmd: impl Into<String>) -> &mut CmdInfosBuilder
Next command if there are multiple commands separated by a :bar.
None if there isn’t a next command.
Sourcepub fn range(&mut self, range: CmdRange) -> &mut CmdInfosBuilder
pub fn range(&mut self, range: CmdRange) -> &mut CmdInfosBuilder
Command range.
Sourcepub fn reg(&mut self, reg: char) -> &mut CmdInfosBuilder
pub fn reg(&mut self, reg: char) -> &mut CmdInfosBuilder
The optional command <register>. None if not specified or if
command cannot take a register.
pub fn build(&mut self) -> CmdInfos
Trait Implementations§
Source§impl Clone for CmdInfosBuilder
impl Clone for CmdInfosBuilder
Source§fn clone(&self) -> CmdInfosBuilder
fn clone(&self) -> CmdInfosBuilder
Returns a duplicate 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 moreSource§impl Default for CmdInfosBuilder
impl Default for CmdInfosBuilder
Source§fn default() -> CmdInfosBuilder
fn default() -> CmdInfosBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CmdInfosBuilder
impl RefUnwindSafe for CmdInfosBuilder
impl Send for CmdInfosBuilder
impl Sync for CmdInfosBuilder
impl Unpin for CmdInfosBuilder
impl UnwindSafe for CmdInfosBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§type Error = Infallible
type Error = Infallible
The error type in the returned
Result.Source§fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
Converts the value into a
Result.