pub struct CacheDir {
pub path: PathBuf,
pub cache_type: CacheDirType,
/* private fields */
}Fields§
§path: PathBuf§cache_type: CacheDirTypeImplementations§
Source§impl CacheDir
impl CacheDir
pub const DADK_BUILD_CACHE_DIR_ENV_KEY_PREFIX: &'static str = "DADK_BUILD_CACHE_DIR"
pub const DADK_SOURCE_CACHE_DIR_ENV_KEY_PREFIX: &'static str = "DADK_SOURCE_CACHE_DIR"
pub fn new( entity: Arc<SchedEntity>, cache_type: CacheDirType, ) -> Result<Self, ExecutorError>
pub fn build_dir(entity: Arc<SchedEntity>) -> Result<PathBuf, ExecutorError>
pub fn source_dir(entity: Arc<SchedEntity>) -> Result<PathBuf, ExecutorError>
pub fn build_dir_env_key( entity: &Arc<SchedEntity>, ) -> Result<String, ExecutorError>
pub fn source_dir_env_key( entity: &Arc<SchedEntity>, ) -> Result<String, ExecutorError>
pub fn need_source_cache(entity: &Arc<SchedEntity>) -> bool
pub fn create(&self) -> Result<(), ExecutorError>
Sourcepub fn is_empty(&self) -> Result<bool, ExecutorError>
pub fn is_empty(&self) -> Result<bool, ExecutorError>
判断缓存目录是否为空
Sourcepub fn remove_self_recursive(&self) -> Result<(), ExecutorError>
pub fn remove_self_recursive(&self) -> Result<(), ExecutorError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheDir
impl RefUnwindSafe for CacheDir
impl Send for CacheDir
impl Sync for CacheDir
impl Unpin for CacheDir
impl UnwindSafe for CacheDir
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