mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-22 03:40:59 +00:00
Add From/Into for url/xsdanyuri
This commit is contained in:
parent
3239b7daa7
commit
83d512d20b
1 changed files with 12 additions and 0 deletions
|
@ -5,6 +5,18 @@ pub struct XsdAnyUri(url::Url);
|
|||
#[error("Could not parse XsdAnyUri")]
|
||||
pub struct XsdAnyUriError;
|
||||
|
||||
impl From<url::Url> for XsdAnyUri {
|
||||
fn from(u: url::Url) -> Self {
|
||||
XsdAnyUri(u)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<XsdAnyUri> for url::Url {
|
||||
fn from(u: XsdAnyUri) -> Self {
|
||||
u.0
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for XsdAnyUri {
|
||||
fn default() -> Self {
|
||||
"data:text/plain,uwu".parse().unwrap()
|
||||
|
|
Loading…
Reference in a new issue