pub mod make;
pub mod meta;
pub mod minimize;
use std::future::Future;
pub use make::MakeOccasion;
pub use meta::MetaOccasion;
pub use minimize::{
CachedExtractedComments, CachedMinimizeEntry, MinimizeOccasion, MinimizePersistentCacheArtifact,
};
use rspack_error::Result;
use super::storage::Storage;
pub trait Occasion {
type Artifact: Send;
fn name(&self) -> &'static str;
fn reset(&self, storage: &mut dyn Storage);
fn save(&self, storage: &mut dyn Storage, artifact: &Self::Artifact);
fn recovery<'a>(
&'a self,
storage: &'a dyn Storage,
) -> impl Future<Output = Result<Self::Artifact>> + Send + 'a;
}