pub struct Descriptor {
pub id: String,
pub summary: String,
pub long: String,
pub privileged: bool,
pub output_kind: String,
pub inputs: Vec<Input>,
pub flags: Vec<String>,
pub examples: Vec<String>,
}Expand description
A complete description of one capability.
Fields§
§id: StringDotted capability id (e.g. services.start).
summary: StringOne-line human summary (maps to clap about).
long: StringFull description (maps to clap long_about).
privileged: boolWhether invoking the capability requires elevated privileges.
output_kind: StringThe envelope kind this capability emits.
inputs: Vec<Input>Inputs the capability accepts.
flags: Vec<String>Flags the capability honors.
examples: Vec<String>Example invocations (maps to clap after_help).
Implementations§
Source§impl Descriptor
impl Descriptor
Sourcepub fn render_text(&self) -> String
pub fn render_text(&self) -> String
Render the descriptor as a complete plain-text block for fez describe
(no --json).
Top-level help promises describe prints inputs, output kind, flags,
and privileged status; this carries the same essential metadata the
JSON form does so an agent reading text output can act safely without
switching to JSON (issue #62).
Trait Implementations§
Source§impl Clone for Descriptor
impl Clone for Descriptor
Source§fn clone(&self) -> Descriptor
fn clone(&self) -> Descriptor
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 Descriptor
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnsafeUnpin for Descriptor
impl UnwindSafe for Descriptor
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