pub struct BuiltCliSpec { /* private fields */ }Expand description
Validated registry used for resolution and help generation.
Implementations§
Source§impl BuiltCliSpec
impl BuiltCliSpec
pub fn spec(&self) -> &CliSpec
pub fn resolve_from<I, S>(&self, args: I) -> Result<CliOutcome, CliError>
Sourcepub fn synthetic_invocations(&self) -> Vec<SyntheticInvocation>
pub fn synthetic_invocations(&self) -> Vec<SyntheticInvocation>
Generate type-correct argv for every combination and every fixed
one_of member. These fixtures exercise the same normalized shapes
used by help rendering without pretending help placeholders are argv.
Sourcepub fn help(&self, command_path: &[String]) -> Option<CliHelpV2>
pub fn help(&self, command_path: &[String]) -> Option<CliHelpV2>
The help model for one command, or for one of its combinations.
The same model --help and --help-combination return, reachable
in-process. Build-time tooling — an offline reference renderer, for
example — needs the whole registry, and this is how it consumes it
without a full-spec dump on the agent’s discovery path.
Sourcepub fn bind_actions<R, I, S>(
&self,
handlers: I,
) -> Result<BoundCliSpec<R>, CliSpecError>
pub fn bind_actions<R, I, S>( &self, handlers: I, ) -> Result<BoundCliSpec<R>, CliSpecError>
Check exact action coverage and return an executable binding.
Trait Implementations§
Source§impl Clone for BuiltCliSpec
impl Clone for BuiltCliSpec
Source§fn clone(&self) -> BuiltCliSpec
fn clone(&self) -> BuiltCliSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BuiltCliSpec
impl RefUnwindSafe for BuiltCliSpec
impl Send for BuiltCliSpec
impl Sync for BuiltCliSpec
impl Unpin for BuiltCliSpec
impl UnsafeUnpin for BuiltCliSpec
impl UnwindSafe for BuiltCliSpec
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