web_url/parse/
from_str.rs1use std::str::FromStr;
2
3use crate::parse::Error;
4use crate::WebUrl;
5
6impl FromStr for WebUrl {
7 type Err = Error;
8
9 fn from_str(s: &str) -> Result<Self, Self::Err> {
10 let url: String = s.to_string();
11 WebUrl::try_from(url).map_err(|(e, _)| e)
12 }
13}