pub struct Extensions {
extensions: HashMap<CmdSrc, Vec<Extension>>,
}Fields§
§extensions: HashMap<CmdSrc, Vec<Extension>>Implementations§
Source§impl Extensions
impl Extensions
pub fn new() -> Self
pub fn exts(&self) -> &HashMap<CmdSrc, Vec<Extension>>
fn add_ext<F>(&mut self, t: ExtensionTOML, f: F) -> Result<bool>
pub fn add_from_app_toml(&mut self, ext_toml: ExtensionTOML) -> Result<bool>
pub fn add_from_pl_toml( &mut self, pl: &Plugin, ext_toml: ExtensionTOML, ) -> Result<bool>
pub fn add_from_aux_toml( &mut self, ns: &AuxCmdNamespace, ext_toml: ExtensionTOML, ) -> Result<bool>
pub fn apply_to_core_cmd<'a>( &'a self, cmd: &str, app: ClapCommand, ) -> ClapCommand
pub fn apply_to_app_cmd<'a>( &'a self, cmd: &str, app: ClapCommand, cache: &mut CmdOptCache, ) -> ClapCommand
pub fn apply_to_pl_cmd<'a>( &'a self, pl: &str, cmd: &str, app: ClapCommand, cache: &mut CmdOptCache, ) -> ClapCommand
pub fn apply_to_aux_cmd<'a>( &'a self, ns: &str, cmd: &str, app: ClapCommand, cache: &mut CmdOptCache, ) -> ClapCommand
pub fn apply_to<'a>( &'a self, cmd: &CmdSrc, app: ClapCommand, cache: &mut CmdOptCache, ) -> ClapCommand
pub fn get_core_ext(&self, cmd_path: &str) -> Option<&Vec<Extension>>
pub fn get_app_ext(&self, cmd_path: &str) -> Option<&Vec<Extension>>
pub fn get_pl_ext(&self, pl: &str, cmd_path: &str) -> Option<&Vec<Extension>>
pub fn get_aux_ext(&self, ns: &str, cmd_path: &str) -> Option<&Vec<Extension>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Extensions
impl RefUnwindSafe for Extensions
impl Send for Extensions
impl Sync for Extensions
impl Unpin for Extensions
impl UnwindSafe for Extensions
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more