shex_ast 0.0.2

Rust implementation of ShEx
Documentation
use serde_derive::{Deserialize, Serialize};
use void::Void;

#[derive(Deserialize, Serialize, Debug, PartialEq, Clone)]
#[serde(try_from = "String", into = "String")]
pub struct Iri {
    value: String,
}

impl Into<String> for Iri {
    fn into(self) -> String {
        self.value
    }
}

impl TryFrom<String> for Iri {
    type Error = Void;
    fn try_from(s: String) -> Result<Self, Self::Error> {
        Ok(Iri { value: s })
    }
}