pub struct TaskCache { /* private fields */ }Expand description
Task cache for managing Azure DevOps tasks
Implementations§
Source§impl TaskCache
impl TaskCache
Sourcepub fn with_config(config: TaskCacheConfig) -> Self
pub fn with_config(config: TaskCacheConfig) -> Self
Create a task cache with custom configuration
Sourcepub fn with_cache_dir(cache_dir: impl AsRef<Path>) -> Self
pub fn with_cache_dir(cache_dir: impl AsRef<Path>) -> Self
Create a task cache with a specific cache directory
Sourcepub fn parse_task_reference(
task_ref: &str,
) -> Result<(String, String), TaskCacheError>
pub fn parse_task_reference( task_ref: &str, ) -> Result<(String, String), TaskCacheError>
Parse a task reference (e.g., “Bash@3” or “DotNetCoreCLI@2.123.4”)
Sourcepub async fn get_task(
&self,
task_ref: &str,
) -> Result<CachedTask, TaskCacheError>
pub async fn get_task( &self, task_ref: &str, ) -> Result<CachedTask, TaskCacheError>
Get a task from the cache, downloading if necessary
Sourcepub async fn get_task_by_name_version(
&self,
name: &str,
version: &str,
) -> Result<CachedTask, TaskCacheError>
pub async fn get_task_by_name_version( &self, name: &str, version: &str, ) -> Result<CachedTask, TaskCacheError>
Get a task by name and version
Sourcepub fn clear_cache(&self) -> Result<()>
pub fn clear_cache(&self) -> Result<()>
Clear all cached tasks
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskCache
impl !RefUnwindSafe for TaskCache
impl Send for TaskCache
impl Sync for TaskCache
impl Unpin for TaskCache
impl UnsafeUnpin for TaskCache
impl !UnwindSafe for TaskCache
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> 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