pub mod devtool;
pub mod make;
pub mod minimize;
use std::future::Future;
pub use devtool::{SourceMapDevToolPluginCache, SourceMapDevToolPluginOccasion};
pub use make::MakeOccasion;
pub use minimize::{MinimizeOccasion, MinimizePersistentCache};
use rspack_error::Result;
use super::storage::Storage;
pub trait Occasion {
type CacheItem: Send;
fn name(&self) -> &'static str;
fn reset(&self, storage: &mut dyn Storage);
fn save(&self, storage: &mut dyn Storage, cache_item: &Self::CacheItem);
fn recovery<'a>(
&'a self,
storage: &'a dyn Storage,
) -> impl Future<Output = Result<Self::CacheItem>> + Send + 'a;
}