[][src]Module lastfm_parse_rs::lastfm_type

Tools for defining common Lastfm data structures and corresponding requests

Re-exports

pub use request::Request;
pub use request::RequestParams;

Traits

LastfmType

All lastfm json data types are wrapped with an extra object. Like this: { tag: { /* actual fields */ } } While Rust object structure has to match json's in order for serde to work, this extra wrapping is not very convenient from users perspective. This trait indicates that type is wrapped and provides deserializable wrapper struct type along with inner type conversion. This trait is used internally to automatically generate wrapper objects and hide them from user (see lastfm_t! macro).

Functions

from_json_slice

Parses given data type from json byte slice (zero-copy) Beware that it will fail in case source contains escape sequences, as serde is currently unable to decode them inplace. Current solution is to unescape input manually beforehand. See https://github.com/serde-rs/json/issues/318 and tests/common/mod.rs for more details.

from_json_str

Parses given data type from json string slice (zero-copy) Beware that it will fail in case source contains escape sequences, as serde is currently unable to decode them inplace. Current solution is to unescape input manually beforehand. See https://github.com/serde-rs/json/issues/318 and tests/common/mod.rs for more details.