Skip to main content

ArtifactCacheSpec

Struct ArtifactCacheSpec 

Source
pub struct ArtifactCacheSpec { /* private fields */ }
Expand description

Complete caller-owned description of one transactional artifact set.

Declared inputs and tools must not be located inside cache_root. Output destinations must remain outside it, resolve to distinct paths, and not overlap a declared input or tool.

Implementations§

Source§

impl ArtifactCacheSpec

Source

pub fn new(cache_root: &Path, namespace: &str, recipe_id: &str) -> Self

Describe one external artifact recipe using non-secret stable identifiers.

The namespace selects an independent content store. recipe_id must be bumped whenever undeclared pipeline semantics change. The default coordination scope is the namespace.

Source

pub fn with_coordination_scope(self, coordination_scope: &str) -> Self

Serialize recipes that share caller-owned mutable external build state.

Source

pub fn with_input(self, label: &str, path: &Path) -> Self

Add one exact input file or directory outside the cache root under a stable label.

Source

pub fn with_tool(self, label: &str, path: &Path) -> Self

Add one exact executable or tool path outside the cache root under a stable label.

Source

pub fn with_arguments(self, arguments: &[&str]) -> Self

Set ordered command arguments that contribute to the content key.

Source

pub fn with_arguments_os<I, S>(self, arguments: I) -> Self
where I: IntoIterator<Item = S>, S: Into<OsString>,

Set OS-native ordered command arguments that contribute to the content key.

Source

pub fn with_environment(self, environment: &[(&str, &str)]) -> Self

Set environment values that contribute to the content key.

Source

pub fn with_environment_os<I, K, V>(self, environment: I) -> Self
where I: IntoIterator<Item = (K, V)>, K: Into<OsString>, V: Into<OsString>,

Set OS-native environment values that contribute to the content key.

Source

pub fn with_unset_environment(self, names: &[&str]) -> Self

Record environment variables whose unset state contributes to the content key.

Source

pub fn with_unset_environment_os<I, S>(self, names: I) -> Self
where I: IntoIterator<Item = S>, S: Into<OsString>,

Record OS-native environment names whose unset state contributes to the content key.

Source

pub fn with_identity_bytes(self, label: &str, value: &[u8]) -> Self

Add opaque non-secret identity bytes under a stable logical label.

Source

pub fn with_output(self, name: &str, destination: &Path) -> Self

Declare one nonempty regular-file output and its nonoverlapping public destination.

Source

pub fn with_output_validation( self, name: &str, destination: &Path, validation: ArtifactOutputValidation, ) -> Self

Declare one output, nonoverlapping public destination, and validation policy.

Source

pub const fn with_prune_policy(self, policy: ArtifactCachePrunePolicy) -> Self

Apply best-effort retention while protecting the acquired entry.

Source

pub fn cache_root(&self) -> &Path

Caller-selected root containing cache data and coordination locks.

Source

pub fn namespace(&self) -> &str

Stable caller-owned content-store namespace.

Source

pub fn recipe_id(&self) -> &str

Stable caller-owned external recipe identity.

Trait Implementations§

Source§

impl Clone for ArtifactCacheSpec

Source§

fn clone(&self) -> ArtifactCacheSpec

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 ArtifactCacheSpec

Source§

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

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

impl Eq for ArtifactCacheSpec

Source§

impl PartialEq for ArtifactCacheSpec

Source§

fn eq(&self, other: &ArtifactCacheSpec) -> 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 ArtifactCacheSpec

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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<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<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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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