#[repr(u8)] #[derive(Copy, Clone, Eq, PartialEq, Debug, strum::IntoStaticStr)]
pub enum FetchCacheMode {
#[strum(serialize = "default")]
Default,
#[strum(serialize = "no-store")]
NoStore,
#[strum(serialize = "reload")]
Reload,
#[strum(serialize = "no-cache")]
NoCache,
#[strum(serialize = "force-cache")]
ForceCache,
#[strum(serialize = "only-if-cached")]
OnlyIfCached,
}
impl FetchCacheMode {
pub const MAP: phf::Map<&'static [u8], FetchCacheMode> = phf::phf_map! {
b"default" => FetchCacheMode::Default,
b"no-store" => FetchCacheMode::NoStore,
b"reload" => FetchCacheMode::Reload,
b"no-cache" => FetchCacheMode::NoCache,
b"force-cache" => FetchCacheMode::ForceCache,
b"only-if-cached" => FetchCacheMode::OnlyIfCached,
};
}