pub struct App<C> { /* private fields */ }Expand description
One ctl process: short-circuits, help, parsing, execution, and presentation.
Implementations§
Source§impl<C> App<C>
impl<C> App<C>
Sourcepub fn view(self, select: impl Fn(&C) -> View + 'static) -> Self
pub fn view(self, select: impl Fn(&C) -> View + 'static) -> Self
Select output, color, and quiet policy from the parsed CLI.
Sourcepub fn before_parse(
self,
hook: impl Fn(&[OsString]) -> Option<ExitCode> + 'static,
) -> Self
pub fn before_parse( self, hook: impl Fn(&[OsString]) -> Option<ExitCode> + 'static, ) -> Self
Add an ordered pre-parse short-circuit, such as dynamic completion.
Sourcepub fn mounted_as(self, task: impl Into<String>) -> Self
pub fn mounted_as(self, task: impl Into<String>) -> Self
Expose a mise Usage spec under a mounted task name.
Auto Trait Implementations§
impl<C> !RefUnwindSafe for App<C>
impl<C> !Send for App<C>
impl<C> !Sync for App<C>
impl<C> !UnwindSafe for App<C>
impl<C> Freeze for App<C>
impl<C> Unpin for App<C>
impl<C> UnsafeUnpin for App<C>
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> 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