pub struct ArtifactMetadata {
pub restorable: bool,
pub restore_command: Option<String>,
pub lockfile: Option<PathBuf>,
pub restore_time_estimate: Option<u32>,
pub extra: HashMap<String, String>,
}Expand description
Additional metadata about an artifact
Fields§
§restorable: boolWhether this can be restored (reinstalled/rebuilt)
restore_command: Option<String>Command to restore (e.g., “npm install”, “cargo build”)
lockfile: Option<PathBuf>Associated lockfile that enables restoration
restore_time_estimate: Option<u32>Estimated restoration time in seconds
extra: HashMap<String, String>Custom properties from plugins
Implementations§
Source§impl ArtifactMetadata
impl ArtifactMetadata
Sourcepub fn restorable(command: impl Into<String>) -> Self
pub fn restorable(command: impl Into<String>) -> Self
Create metadata for a restorable artifact
Sourcepub fn with_lockfile(self, lockfile: PathBuf) -> Self
pub fn with_lockfile(self, lockfile: PathBuf) -> Self
Set the lockfile
Sourcepub fn with_restore_time(self, seconds: u32) -> Self
pub fn with_restore_time(self, seconds: u32) -> Self
Set restoration time estimate
Trait Implementations§
Source§impl Clone for ArtifactMetadata
impl Clone for ArtifactMetadata
Source§fn clone(&self) -> ArtifactMetadata
fn clone(&self) -> ArtifactMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArtifactMetadata
impl Debug for ArtifactMetadata
Source§impl Default for ArtifactMetadata
impl Default for ArtifactMetadata
Source§fn default() -> ArtifactMetadata
fn default() -> ArtifactMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ArtifactMetadata
impl<'de> Deserialize<'de> for ArtifactMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ArtifactMetadata
impl RefUnwindSafe for ArtifactMetadata
impl Send for ArtifactMetadata
impl Sync for ArtifactMetadata
impl Unpin for ArtifactMetadata
impl UnwindSafe for ArtifactMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more