Skip to main content

CommandSpec

Struct CommandSpec 

Source
pub struct CommandSpec {
    pub name: String,
    pub description: String,
    pub aliases: Vec<String>,
    pub url: String,
    pub category: String,
    pub researched_version: Option<String>,
    pub examples_safe: Vec<String>,
    pub examples_denied: Vec<String>,
    /* private fields */
}

Fields§

§name: String§description: String§aliases: Vec<String>§url: String§category: String§researched_version: Option<String>

Upstream version of the underlying tool that was researched when this spec was last updated. Free-form string — e.g. "1.9.0", "v5.10.3", "2026-05-08 master", "@northflank/cli 0.10.15". Internal-only: not rendered in docs or used at runtime. Surfaces in tests and as a tripwire when researching newer versions of the same tool.

§examples_safe: Vec<String>

Sample invocations that the registry test runs through is_safe_command. Each examples_safe entry must produce Verdict::Allowed.

§examples_denied: Vec<String>

Sample invocations that must be denied. Use these to lock in security boundaries (e.g. srb tc --metrics-file=/etc/passwd should always be denied; recording it here catches regressions).

Trait Implementations§

Source§

impl Debug for CommandSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.