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