youtube-metadata 0.1.1

YouTube video metadata fetcher
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

pub type YoutubeResult<T> = Result<T, YoutubeError>;

#[derive(Debug, Error)]
pub enum YoutubeError {
    #[error(transparent)]
    Reqwest(#[from] reqwest::Error),

    #[error("Parse Error: {0}")]
    ParseError(String),
}

impl From<&str> for YoutubeError {
    fn from(s: &str) -> Self {
        Self::ParseError(s.to_string())
    }
}