Skip to main content

cargo_reclaim/
lib.rs

1pub mod active_process;
2pub mod background;
3pub mod cargo_home;
4pub mod classifier;
5pub mod config;
6pub mod disk;
7pub mod error;
8pub mod executor;
9pub mod integration;
10pub mod inventory;
11pub mod model;
12pub mod persistence;
13pub mod plan_edit;
14pub mod planner;
15pub mod policy;
16pub mod scanner;
17mod scheduler;
18mod toolchain_hash;
19pub mod watcher;
20
21pub use active_process::{
22    ActiveObservationProvider, ActiveObservationScope, DISABLE_ACTIVE_PROCESS_DETECTION_ENV,
23    ProcfsActiveObservationProvider, SysinfoActiveObservationProvider,
24    platform_active_observation_provider,
25};
26pub use background::{
27    BACKGROUND_RUN_LOG_SCHEMA_VERSION, BACKGROUND_SERVICE_STATE_SCHEMA_VERSION,
28    BackgroundApplyEntrySummary, BackgroundApplySummary, BackgroundApplyTotals,
29    BackgroundPlanSummary, BackgroundPlanTotals, BackgroundRunEventKind, BackgroundRunLogError,
30    BackgroundRunLogRecord, BackgroundRunLogResult, BackgroundRunReport, BackgroundRunRequest,
31    BackgroundRunTrigger, BackgroundRunnerError, BackgroundRunnerResult, BackgroundServiceClock,
32    BackgroundServiceCycleRunner, BackgroundServiceError, BackgroundServiceOptions,
33    BackgroundServicePaths, BackgroundServiceResult, BackgroundServiceRunSummary,
34    BackgroundServiceSleeper, BackgroundServiceState, BackgroundServiceStatus,
35    BackgroundSkippedProject, BackgroundTriggerReasonSummary, BackgroundTriggerSummary,
36    DEFAULT_BACKGROUND_CHECK_EVERY, PlatformBackgroundServiceCycleRunner,
37    SystemBackgroundServiceClock, ThreadBackgroundServiceSleeper, append_background_run_log_record,
38    read_background_run_log, read_background_service_state, refresh_background_service_state,
39    run_background_cleanup_cycle, run_background_service, run_background_service_with_runtime,
40    write_background_service_state,
41};
42pub use cargo_home::{
43    CARGO_HOME_PERSISTED_PLAN_SCHEMA_VERSION, CARGO_HOME_PLAN_SCHEMA_VERSION,
44    CARGO_HOME_REPORT_SCHEMA_VERSION, CargoHomeApplyEntryResult, CargoHomeApplyEntryStatus,
45    CargoHomeApplyReport, CargoHomeApplyTotals, CargoHomeClass, CargoHomeEntry, CargoHomeError,
46    CargoHomeInput, CargoHomePathKind, CargoHomePlan, CargoHomePlanAction, CargoHomePlanEntry,
47    CargoHomePlanRequest, CargoHomePlanTotals, CargoHomeProblem, CargoHomeRecommendation,
48    CargoHomeReport, CargoHomeReportRequest, CargoHomeResolveRequest, CargoHomeSource,
49    CargoHomeTotals, PersistedCargoHomeInput, PersistedCargoHomePlan, PersistedCargoHomePlanBody,
50    PersistedCargoHomePlanEntry, PersistedCargoHomePlanSnapshot, PersistedCargoHomePlanTotals,
51    SaveCargoHomePlanOptions, build_cargo_home_plan, build_cargo_home_plan_from_report,
52    build_cargo_home_report, classify_cargo_home_relative_path, ensure_cargo_home_plan_usable,
53    execute_cargo_home_plan_apply, inventory_cargo_home, load_cargo_home_plan_from_path,
54    persist_cargo_home_plan, resolve_cargo_home, save_cargo_home_plan_to_path,
55    validate_cargo_home_plan_for_apply,
56};
57pub use classifier::{Classifier, classify_target_relative_path};
58pub use config::{
59    BackgroundConfig, BackgroundMode, CARGO_CONFIG_RECOMMEND_SCHEMA_VERSION, CargoConfigOutputDir,
60    CargoConfigRecommendReport, CargoConfigRecommendRequest, CargoConfigRecommendation,
61    ConfigError, PolicyThresholdConfig, ReclaimConfig, WholeTargetConfig,
62    build_cargo_config_recommend_report, load_config_from_path, parse_config,
63};
64pub use disk::{DiskFreeSpace, disk_free_basis_points, disk_free_space};
65pub use error::{ReclaimError, ReclaimResult};
66pub use executor::{
67    ApplyEntryResult, ApplyEntryStatus, ApplyReport, ApplyTotals, execute_persisted_plan_apply,
68    validate_persisted_plan_for_apply,
69};
70pub use integration::{
71    BuildPlanFromScanItemsRequest, BuildPlanFromScanItemsWithProviderRequest,
72    active_observation_scope_from_scan_items, build_plan_from_roots,
73    build_plan_from_roots_with_active_observation,
74    build_plan_from_roots_with_active_observation_provider, build_plan_from_roots_with_options,
75    build_plan_from_scan_items, build_plan_from_scan_items_with_active_observation,
76    build_plan_from_scan_items_with_active_observation_provider,
77    build_plan_from_scan_items_with_options,
78};
79pub use inventory::{
80    InventoryOptions, planner_candidate_from_target_relative_path,
81    planner_candidate_from_target_relative_path_with_context, planner_candidates_from_target_root,
82    planner_candidates_from_target_root_with_context, snapshot_path, snapshot_path_parallel,
83    snapshot_target_relative_path,
84};
85pub use model::{
86    ArtifactClass, PLAN_SCHEMA_VERSION, PathKind, PathSnapshot, Plan, PlanAction, PlanEntry,
87    PlanInput, PlanSkip, PlanSkipReason, PlanTotals, TargetEvidence,
88};
89pub use persistence::{
90    PERSISTED_PLAN_SCHEMA_VERSION, PersistedEvidence, PersistedInventoryOptions,
91    PersistedPathSnapshot, PersistedPlan, PersistedPlanBody, PersistedPlanEntry,
92    PersistedPlanInput, PersistedPlanSkip, PersistedPlanSnapshot, PersistedPlanTotals,
93    PersistedPlannerOptions, PersistedScannerOptions, PersistedTimestamp, PersistedWholeTargetMode,
94    PlanCommandKind, PlanId, PlanInvocation, PlanPersistenceError, PlanPersistenceResult,
95    SavePlanOptions, ensure_plan_usable, load_plan_from_path, persist_plan, save_plan_to_path,
96};
97pub use plan_edit::{PlanEditError, PlanEditReport, PlanEditRequest, edit_persisted_plan};
98pub use planner::{
99    ActiveObservation, CargoTool, ObservedCargoProcess, PlannerCandidate, PlannerOptions,
100    ProcessView, TargetContext, WholeTargetMode, build_plan, build_plan_with_active_observation,
101    build_plan_with_options, plan_candidate, plan_candidate_with_active_observation,
102    plan_candidate_with_options,
103};
104pub use policy::PolicyKind;
105pub use scanner::{
106    CargoConfigProblem, CargoConfigUnsupported, CargoConfigUnsupportedReason, CargoOutputDirs,
107    CargoProject, ScanItem, ScanSkip, ScanSkipReason, ScannerOptions, SkipReason, TargetCandidate,
108    TargetCandidateKind, TargetDirOverride, TargetDirOverrideSource, classify_target_candidate,
109    detect_cargo_project, resolve_project_output_dirs, resolve_project_output_dirs_with_env,
110    scan_roots,
111};
112pub use scheduler::RealSchedulerOperationBackend;
113pub use scheduler::{
114    DEFAULT_SCHEDULER_INSTANCE_NAME, GeneratedArtifact, GeneratedArtifactKind, RemoveFileOutcome,
115    Schedule, SchedulerCommandOutput, SchedulerError, SchedulerExecutionReport,
116    SchedulerExecutionStatus, SchedulerExecutionStep, SchedulerExecutionTotals, SchedulerMode,
117    SchedulerOperation, SchedulerOperationBackend, SchedulerOperationPlan, SchedulerPlanStep,
118    SchedulerPlatform, SchedulerReport, SchedulerRequest, artifact_kind_label,
119    default_instance_log_dir, default_instance_state_dir, default_log_dir, default_state_dir,
120    execute_scheduler_operation, execution_status_label, generate_scheduler_artifacts, mode_label,
121    operation_label, plan_scheduler_install, plan_scheduler_uninstall, platform_label,
122    policy_label, scheduler_instance_name_from_config,
123};
124pub use toolchain_hash::{
125    ToolchainHashError, ToolchainHashResolver, ToolchainHashResult,
126    resolve_command_toolchain_hash_options, resolve_toolchain_hash_options,
127};
128pub use watcher::{
129    WatcherDecision, WatcherDecisionInput, WatcherDecisionState, WatcherMode,
130    WatcherObservedTarget, WatcherThresholds, WatcherTriggerReason, decide_watcher_thresholds,
131};