Skip to main content

Action

Enum Action 

Source
pub enum Action {
    Write {
        destination: Utf8PathBuf,
    },
    Unchanged {
        destination: Utf8PathBuf,
    },
    Sweep {
        destination: Utf8PathBuf,
    },
    SweepFailed {
        destination: Utf8PathBuf,
        error: String,
    },
    Remove {
        destination: Utf8PathBuf,
    },
    KeptEdited {
        destination: Utf8PathBuf,
    },
    KeptDirectory {
        directory: Utf8PathBuf,
    },
    RecordUnwritten {
        record: Utf8PathBuf,
    },
}
Expand description

One thing an install or uninstall did, or — in a preview — would do.

Variants§

§

Write

The payload’s bytes land at this destination.

Fields

§destination: Utf8PathBuf

The SKILL.md path written.

§

Unchanged

The destination already holds the payload’s bytes.

Fields

§destination: Utf8PathBuf

The SKILL.md path left alone.

§

Sweep

A recorded leftover the payload no longer names is removed.

Fields

§destination: Utf8PathBuf

The leftover taken back.

§

SweepFailed

A leftover could not be removed; it stays for the operator.

Fields

§destination: Utf8PathBuf

The leftover still in place.

§error: String

Why the removal failed.

§

Remove

An installed destination is removed.

Fields

§destination: Utf8PathBuf

The SKILL.md path removed.

§

KeptEdited

A destination holding bytes neither the payload nor the record accounts for is the user’s now, and an uninstall leaves it.

Fields

§destination: Utf8PathBuf

The edited SKILL.md path left in place.

§

KeptDirectory

A directory survives a removal because something else lives in it.

Fields

§directory: Utf8PathBuf

The directory kept.

§

RecordUnwritten

The record could not be written; a later install may ask for --force it should not need.

Fields

§record: Utf8PathBuf

The record path that did not write.

Trait Implementations§

Source§

impl Debug for Action

Source§

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

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

impl Eq for Action

Source§

impl PartialEq for Action

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for Action

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Action

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> 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, <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.