diff --git a/src/uri/mod.rs b/src/uri/mod.rs index b79cb704..3881f82e 100644 --- a/src/uri/mod.rs +++ b/src/uri/mod.rs @@ -736,6 +736,28 @@ impl<'a> TryFrom<&'a Uri> for Uri { } } +/// Convert an `Authority` into a `Uri`. +impl From for Uri { + fn from(authority: Authority) -> Self { + Self { + scheme: Scheme::empty(), + authority, + path_and_query: PathAndQuery::empty(), + } + } +} + +/// Convert a `PathAndQuery` into a `Uri`. +impl From for Uri { + fn from(path_and_query: PathAndQuery) -> Self { + Self { + scheme: Scheme::empty(), + authority: Authority::empty(), + path_and_query, + } + } +} + /// Convert a `Uri` from parts /// /// # Examples