pub struct Surface {
pub binary: String,
pub mount: String,
pub about: String,
pub version: Option<String>,
pub arguments: Vec<SurfaceArgument>,
pub inherited_arguments: Vec<SurfaceArgument>,
pub commands: Vec<SurfaceCommand>,
pub usage_kdl: String,
pub mount_line: String,
pub notes: BTreeMap<String, String>,
}Expand description
Serializable operator-facing projection of one Clap command graph.
Fields§
§binary: StringExecutable name declared by the root Clap command.
mount: StringMise task name used for mounted invocations.
about: StringRoot command description.
version: Option<String>Root package version, when Clap declares one.
arguments: Vec<SurfaceArgument>Arguments and flags declared directly on the root, in Clap order.
inherited_arguments: Vec<SurfaceArgument>Ancestor global arguments, always empty for the root.
commands: Vec<SurfaceCommand>Root subcommands in Clap declaration order, including hidden commands.
usage_kdl: StringUsage KDL for the mounted task name.
mount_line: StringExact #USAGE mount line for a served mise task.
notes: BTreeMap<String, String>Consumer-owned operator notes keyed for skill or instruction templates.
Implementations§
Source§impl Surface
impl Surface
Sourcepub fn new<C: CommandFactory>(mount: impl Into<String>) -> Self
pub fn new<C: CommandFactory>(mount: impl Into<String>) -> Self
Extract an operator surface from a Clap
CommandFactory.
Sourcepub fn from_command(command: Command, mount: impl Into<String>) -> Self
pub fn from_command(command: Command, mount: impl Into<String>) -> Self
Extract an operator surface from a Clap command graph.
Trait Implementations§
impl Eq for Surface
impl StructuralPartialEq for Surface
Auto Trait Implementations§
impl Freeze for Surface
impl RefUnwindSafe for Surface
impl Send for Surface
impl Sync for Surface
impl Unpin for Surface
impl UnsafeUnpin for Surface
impl UnwindSafe for Surface
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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