Skip to main content

Action

Enum Action 

Source
pub enum Action {
    Download {
        clip: Clip,
        lineage: LineageContext,
        path: String,
        format: AudioFormat,
    },
    Reformat {
        clip: Clip,
        path: String,
        from_path: String,
        from: AudioFormat,
        to: AudioFormat,
    },
    Retag {
        clip: Clip,
        lineage: LineageContext,
        path: String,
    },
    Rename {
        from: String,
        to: String,
    },
    Delete {
        path: String,
        clip_id: String,
    },
    Skip {
        clip_id: String,
    },
    WriteArtifact {
        kind: ArtifactKind,
        path: String,
        source_url: String,
        hash: String,
        owner_id: String,
        content: Option<String>,
    },
    DeleteArtifact {
        kind: ArtifactKind,
        path: String,
        owner_id: String,
    },
    WriteStem {
        clip_id: String,
        key: String,
        stem_id: String,
        path: String,
        source_url: String,
        format: StemFormat,
        hash: String,
    },
    DeleteStem {
        clip_id: String,
        key: String,
        path: String,
    },
}
Expand description

One executable step in a Plan.

Variants§

§

Download

Download the clip to path in format (new, missing, or zero length).

Fields

§clip: Clip
§path: String
§

Reformat

Render the clip to path in to, replacing the prior from rendering.

A format change always changes the file extension, so the prior file at from_path is a different path that must be removed once the new file is written; carrying it keeps the plan a full account of disk mutations.

Fields

§clip: Clip
§path: String
§from_path: String
§

Retag

Re-tag the existing file at path to match current metadata or art.

Fields

§clip: Clip
§path: String
§

Rename

Move the file from one relative path to another.

Fields

§from: String
§

Delete

Delete the local file for a clip that has left every mirror source.

Fields

§path: String
§clip_id: String
§

Skip

Take no action for a clip; recorded so the plan is a full account.

Fields

§clip_id: String
§

WriteArtifact

Write (or rewrite) an external sidecar artifact for its owning clip.

Emitted when the manifest lacks the artifact or its stored hash differs from hash. A write is additive and never gated by deletion safety.

content carries an inline body for generated artifacts (playlists): when Some, the executor writes those exact bytes atomically and skips the network entirely; when None, it fetches (and transcodes) from source_url as before. A fetched artifact leaves source_url set and content None; a generated one leaves source_url empty and content Some.

Fields

§path: String
§source_url: String
§hash: String
§owner_id: String
§content: Option<String>
§

DeleteArtifact

Delete an external sidecar artifact (a removed kind, or a co-deleted sidecar of a clip whose audio is being deleted).

Only ever emitted through [delete_artifact_action], which shares the audio can_delete gate and the owning entry’s preserve marker, so a sidecar is never removed on an incomplete listing or for a preserved clip.

Fields

§path: String
§owner_id: String
§

WriteStem

Write (or rewrite) one stem file for its owning clip.

Emitted when the clip’s manifest stem map lacks this key, or its stored hash or path drifts (the song moved, or the stem format changed). A write is additive and never gated by deletion safety. Stems are stored RAW in their native container and never transcoded to FLAC: a Wav stem is rendered through the free convert_wav flow keyed on stem_id, an Mp3 stem is fetched straight from source_url. key is the stable stem key, so the executor updates the right slot in the clip’s keyed stem map.

Fields

§clip_id: String
§stem_id: String
§path: String
§source_url: String
§format: StemFormat
§hash: String
§

DeleteStem

Delete one stem file and clear its slot in the clip’s keyed stem map.

Only ever emitted through [delete_stem_action], which shares the audio can_delete gate and the owning entry’s preserve marker, so a stem is never removed on an incomplete listing or for a preserved clip. Emitted either when an AUTHORITATIVE stem listing no longer contains key, or as a co-delete when the owning clip’s audio is deleted (so the .stems folder is never orphaned).

Fields

§clip_id: String
§path: String

Trait Implementations§

Source§

impl Clone for Action

Source§

fn clone(&self) -> Action

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 Debug for Action

Source§

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

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

impl PartialEq for Action

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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> 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<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> 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.