INNER CODE UNIT · Rust

new

aome510/spotify-player · lyric_finder/src/lib.rs:49

    pub fn new() -> Self {
        Self {
            http: reqwest::Client::new(),
        }
    }

    /// Construct a client reusing an existing http client
    #[must_use]
    pub fn from_http_client(http: &reqwest::Client) -> Self {
        Self { http: http.clone() }
    }

    /// Search songs satisfying a given `query`.
    pub async fn search_songs(&self, query: &str) -> anyhow::Result<Vec<search::Result>> {
        let query = improve_query(query);

        log::debug!("search songs: query={query}");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…