kodik-api 0.3.3

An unofficial async Rust library that allows you to interact with the Kodik API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde::ser;

use crate::error::Error;

pub fn serialize_into_query_parts<T: ser::Serialize>(
    input: T,
) -> Result<Vec<(String, String)>, Error> {
    let serialized =
        comma_serde_urlencoded::to_string(input).map_err(Error::UrlencodedSerializeError)?;

    let parts =
        comma_serde_urlencoded::from_str(&serialized).map_err(Error::UrlencodedDeserializeError)?;

    Ok(parts)
}