#[non_exhaustive]pub enum Target<'a> {
Path(&'a str),
PathQuery {
path: &'a str,
query: &'a str,
},
Url(&'a str),
}Expand description
The target of a request.
The Debug output shows no userinfo of a URL. A query shows as
?<redacted>, and a fragment shows as #<redacted>, in a URL and in a
path. The query of Target::PathQuery shows as <redacted>.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Path(&'a str)
A path under the base URL of each mirror.
PathQuery
A path under the base URL of each mirror, with a query string.
The fetcher adds ? and the query to the URL of each mirror. It sends
the query as written, so the query carries the escapes that the server
expects.
Fields
§
path: &'a strThe path, read as Target::Path is.
Url(&'a str)
An absolute http or https URL.
The fetcher does not use the mirror list for it.
Trait Implementations§
impl<'a> Copy for Target<'a>
impl<'a> Eq for Target<'a>
impl<'a> StructuralPartialEq for Target<'a>
Auto Trait Implementations§
impl<'a> Freeze for Target<'a>
impl<'a> RefUnwindSafe for Target<'a>
impl<'a> Send for Target<'a>
impl<'a> Sync for Target<'a>
impl<'a> Unpin for Target<'a>
impl<'a> UnsafeUnpin for Target<'a>
impl<'a> UnwindSafe for Target<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.