Struct PercentEncoded
struct PercentEncoded<T, S> { ... }
A proxy to percent-encode a string.
Type aliases PercentEncodedForIri and PercentEncodedForUri are provided.
You can use them to make the expression simpler, for example write
PercentEncodedForUri::from_path(foo) instead of
PercentEncoded::<_, UriSpec>::from_path(foo).
Implementations
impl<T: fmt::Display, S: Spec> PercentEncoded<T, S>
fn from_reg_name(raw: T) -> SelfCreates an encoded string from a raw reg-name (i.e. hostname or domain).
Examples
#fn from_user(raw: T) -> SelfCreates an encoded string from a raw user name (inside
userinfocomponent).Examples
#fn from_password(raw: T) -> SelfCreates an encoded string from a raw user name (inside
userinfocomponent).Examples
#fn from_path_segment(raw: T) -> SelfCreates an encoded string from a raw path segment.
Examples
#fn from_path(raw: T) -> SelfCreates an encoded string from a raw path.
Examples
#fn from_query(raw: T) -> SelfCreates an encoded string from a raw query.
Examples
#fn from_fragment(raw: T) -> SelfCreates an encoded string from a raw fragment.
Examples
#fn unreserve(raw: T) -> SelfCreates a string consists of only
unreservedstring and percent-encoded triplets.Examples
#fn characters(raw: T) -> SelfPercent-encodes characters only if they cannot appear anywhere in an IRI reference.
%character will be always encoded. In other words, this conversion is not aware of percent-encoded triplets.Note that this encoding process does not guarantee that the resulting string is a valid IRI reference.
Examples
#
impl<T> Any for PercentEncoded<T, S>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for PercentEncoded<T, S>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for PercentEncoded<T, S>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for PercentEncoded<T, S>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for PercentEncoded<T, S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for PercentEncoded<T, S>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for PercentEncoded<T, S>
fn to_string(self: &Self) -> String
impl<T> ToStringFallible for PercentEncoded<T, S>
fn try_to_string(self: &Self) -> Result<String, TryReserveError>[
ToString::to_string]alloc::string::ToString::to_string, but without panic on OOM.
impl<T, S> Freeze for PercentEncoded<T, S>
impl<T, S> RefUnwindSafe for PercentEncoded<T, S>
impl<T, S> Send for PercentEncoded<T, S>
impl<T, S> Sync for PercentEncoded<T, S>
impl<T, S> Unpin for PercentEncoded<T, S>
impl<T, S> UnsafeUnpin for PercentEncoded<T, S>
impl<T, S> UnwindSafe for PercentEncoded<T, S>
impl<T, U> Into for PercentEncoded<T, S>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for PercentEncoded<T, S>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for PercentEncoded<T, S>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::clone::Clone, S: $crate::clone::Clone> Clone for PercentEncoded<T, S>
fn clone(self: &Self) -> PercentEncoded<T, S>
impl<T: $crate::fmt::Debug, S: $crate::fmt::Debug> Debug for PercentEncoded<T, S>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T: $crate::marker::Copy, S: $crate::marker::Copy> Copy for PercentEncoded<T, S>
impl<T: fmt::Display, S: Spec> Display for PercentEncoded<T, S>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result