pub struct RemoteCacheConfig {
pub url: String,
pub token: Option<String>,
pub env_vars: BTreeSet<String>,
pub input_files: Vec<String>,
pub max_artifact_size: Option<u64>,
pub read_only: bool,
}Expand description
Configuration for remote cache.
Fields§
§url: StringBackend URL (HTTP URL or filesystem path).
token: Option<String>Authentication token (for HTTP backends).
env_vars: BTreeSet<String>Environment variables to include in cache keys.
Only explicitly listed environment variables will be hashed into cache keys.
input_files: Vec<String>Input files to track for cache key generation.
Patterns are relative to package root. Supports glob patterns.
max_artifact_size: Option<u64>Maximum artifact size in bytes (default: 1GB).
read_only: boolRead-only mode (disable uploads).
Implementations§
Source§impl RemoteCacheConfig
impl RemoteCacheConfig
Sourcepub fn with_token(self, token: impl Into<String>) -> Self
pub fn with_token(self, token: impl Into<String>) -> Self
Sets the authentication token.
Sourcepub fn add_env_var(self, var: impl Into<String>) -> Self
pub fn add_env_var(self, var: impl Into<String>) -> Self
Adds an environment variable to track.
Sourcepub fn add_env_vars<I>(self, vars: I) -> Selfwhere
I: IntoIterator<Item = String>,
pub fn add_env_vars<I>(self, vars: I) -> Selfwhere
I: IntoIterator<Item = String>,
Adds multiple environment variables to track.
Sourcepub fn add_input_file(self, pattern: impl Into<String>) -> Self
pub fn add_input_file(self, pattern: impl Into<String>) -> Self
Adds an input file pattern to track.
Sourcepub fn max_artifact_size(self, size: u64) -> Self
pub fn max_artifact_size(self, size: u64) -> Self
Sets maximum artifact size.
Sourcepub fn is_filesystem(&self) -> bool
pub fn is_filesystem(&self) -> bool
Checks if this is a filesystem backend.
Trait Implementations§
Source§impl Clone for RemoteCacheConfig
impl Clone for RemoteCacheConfig
Source§fn clone(&self) -> RemoteCacheConfig
fn clone(&self) -> RemoteCacheConfig
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 RemoteCacheConfig
impl Debug for RemoteCacheConfig
Source§impl Default for RemoteCacheConfig
impl Default for RemoteCacheConfig
Source§impl<'de> Deserialize<'de> for RemoteCacheConfig
impl<'de> Deserialize<'de> for RemoteCacheConfig
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 RemoteCacheConfig
impl RefUnwindSafe for RemoteCacheConfig
impl Send for RemoteCacheConfig
impl Sync for RemoteCacheConfig
impl Unpin for RemoteCacheConfig
impl UnwindSafe for RemoteCacheConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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