Skip to main content

HandlerSpec

Struct HandlerSpec 

Source
pub struct HandlerSpec {
    pub name: &'static str,
    pub aliases: &'static [&'static str],
    pub type_id: i8,
    pub ecosystem: &'static str,
    pub extensions: &'static [&'static str],
    pub claim: Claim,
    pub description: &'static str,
    pub fields: &'static [(&'static str, Col)],
    pub commands: &'static [(&'static str, &'static str)],
}
Expand description

The static description of one handler: every fact about it, stated once.

Fields§

§name: &'static str

Canonical handler name, e.g. "cargo".

§aliases: &'static [&'static str]

Alternate names accepted on the CLI, e.g. ["rust"].

§type_id: i8

On-disk pkg_type discriminant this handler writes.

§ecosystem: &'static str

Human description of the packaging ecosystem.

§extensions: &'static [&'static str]

File extensions the handler advertises.

§claim: Claim

How the handler claims a path (see Claim); matches_path is this.

§description: &'static str

One-line summary.

§fields: &'static [(&'static str, Col)]

The index columns this handler contributes (keys of its ExtensionRow).

§commands: &'static [(&'static str, &'static str)]

Subcommands beyond the shared coords, as (verb, about).

Implementations§

Source§

impl HandlerSpec

Source

pub fn claims(&self, path: &str) -> bool

True if this handler claims path, as its Claim states.

Trait Implementations§

Source§

impl Debug for HandlerSpec

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> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.