feat: add channel playlists

- add tests for channel videos
- small model refactor (rename Channel to ChannelTag)
This commit is contained in:
ThetaDev 2022-09-26 20:36:01 +02:00
parent 45707c4d01
commit 6f1a1c4440
30 changed files with 16831 additions and 241 deletions

View file

@ -41,6 +41,25 @@ where
}
}
impl<T> MapResult<T>
where
T: Default,
{
pub fn error(msg: String) -> Self {
Self {
c: T::default(),
warnings: vec![msg],
}
}
pub fn ok(c: T) -> Self {
Self {
c,
warnings: Vec::new(),
}
}
}
/// Deserialization method that consumes anything and returns an empty value.
/// Intended to be used for a wildcard enum option.
///