Skip to main content

Manager

Struct Manager 

Source
pub struct Manager { /* private fields */ }

Implementations§

Source§

impl Manager

Source

pub fn install(&self, r: &ProviderReference, force: bool) -> Result<Receipt>

Install (or upgrade to a specific tag). The krew atomicity sequence: staging → verify → extract → receipt LAST → swap. Plain-HTTP tarball refs stay on the CLI path (deliberate deployments, plans/0014); everything else flows through [install_inner] with a live Ui.

Source

pub fn install_inner( &self, r: &ProviderReference, force: bool, ui: &ProgressOutput, expect_sha: Option<&str>, ) -> Result<Receipt>

The release-install flow with the Ui swapped in — the update_inner pattern: rootle update’s sweep and the TUI’s consent install (0019) drive the same verified flow, the latter through a silent recorder Ui.

Source

pub fn install_path(&self, name: &str, path: &Path) -> Result<Receipt>

Local dev install: symlink a binary, no network (gh’s gh extension install . model).

Source

pub fn update( &self, name: Option<&str>, ) -> Result<Vec<(String, String, String)>>

krew’s non-mutating update: refresh the latest-known tag into receipts. Returns (name, current, latest) for the ones that are stale.

Source

pub fn upgrade( &self, name: Option<&str>, dry_run: bool, force: bool, ) -> Result<()>

upgrade: swap the binary for the latest-known (or fresh latest) tag. Pinned skips unless force.

Source

pub fn sweep(&self, dry_run: bool, ui: &ProgressOutput) -> Vec<SweepOutcome>

rootle update’s provider sweep (0019 M1): refresh-and-upgrade every tracked, unpinned receipt with failures isolated per provider — one dead forge neither aborts the rest nor fails the command’s app half. Outcome rows are returned for the caller to render; the release-install stages render through ui. dry_run reports staleness without swapping anything.

Source§

impl Manager

Source

pub fn current_binary(&self, name: &str) -> Option<PathBuf>

The binary path the current symlink resolves to.

Source

pub fn receipt(&self, name: &str) -> Option<Receipt>

Source

pub fn receipts(&self) -> Vec<Receipt>

Source

pub fn pin(&self, name: &str, tag: Option<String>) -> Result<()>

Pin an installed provider to its current (or given) tag — update leaves pinned receipts alone.

Source

pub fn unpin(&self, name: &str) -> Result<()>

Source

pub fn remove(&self, name: &str) -> Result<()>

Source§

impl Manager

Source

pub fn new() -> Result<Manager>

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more