badpod 0.9.1

A Rust crate for working with imperfect feeds of podcasts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub fn from_str_exact<T: strum::IntoEnumIterator + std::fmt::Display>(s: &str) -> Option<T>
where
{
    T::iter().find(|variant| format!("{variant}") == s)
}

pub fn from_str_case_insensitive<T: strum::IntoEnumIterator + std::fmt::Display>(
    s: &str,
) -> Option<T>
where
{
    T::iter().find(|variant| format!("{variant}").to_lowercase() == s.to_lowercase())
}