pub trait Deserializer<'a, T: Deserialize<'a>> {
    // Required methods
    fn deserialize(&self, contents: &'a str, url: Option<&Url>) -> Result<T>;
    fn name(&self) -> &str;
}
Expand description

All deserializers have to implement this trait for content deserialization, plus a method to return their name to be able to inform the user of which deserializer was used

Required Methods§

source

fn deserialize(&self, contents: &'a str, url: Option<&Url>) -> Result<T>

Deserialize the supplied content that was loaded from url into a P

source

fn name(&self) -> &str

Return the name of the serializer implementing this trait

Implementors§