Skip to main content

InstallHint

Struct InstallHint 

Source
pub struct InstallHint {
    pub program: &'static str,
    pub guidance: Guidance,
}
Expand description

How to obtain one program from Adapter::host_programs, for the refusal that discovers it is absent.

The counterpart of the refusal rule in docs/REVIEW_CHECKLIST.md: a refusal names the way forward, and this is the way forward for the one obstacle Roteiro will never clear on the reader’s behalf. It is keyed by program and not by analyzer because a single analyzer’s programs are obtained differently — cargo-audit needs cargo from rustup and cargo-audit from crates.io, and one hint covering both would be right about at most one of them. That is the “right kind of way forward” check, which is the one that has shipped wrong here before.

§What may go in one, and what may not

  • The command is upstream’s, verbatim, or there is none. Every command below was read off the tool’s own install page at the time it was written, not recalled. Where upstream documents no single command — osv-scanner offers eight platform-specific ones and ranks none — the hint says so and gives the page. A plausible command that fails is worse than a URL.
  • Never the reader’s package manager. No brew, no apt, unless upstream itself names one as the way. A canonical ecosystem command is portable and checkable; a package-manager guess is wrong for most readers.
  • Always the upstream page. A URL ages better than a command line, so even a hint with a good command carries the page that would correct it.
  • Saying how is not doing it. Nothing reads a hint and runs it. Roteiro installs no analyzer (ADR-0014), and a refusal that quietly installed one is the silent downgrade ADR-0019 §6 and ADR-0020 §6 forbid.

Fields§

§program: &'static str

The program this obtains — an entry in the same adapter’s Adapter::host_programs, which is what tests::every_host_program_has_an_install_hint pairs them by.

§guidance: Guidance

What to tell the reader, rendered by Guidance so a message built from it cannot lose its own indentation. See crate::guidance.

Trait Implementations§

Source§

impl Clone for InstallHint

Source§

fn clone(&self) -> InstallHint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for InstallHint

Source§

impl Debug for InstallHint

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for InstallHint

Source§

impl PartialEq for InstallHint

Source§

fn eq(&self, other: &InstallHint) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for InstallHint

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.