Struct urlencoding::Encoded
source · #[repr(transparent)]pub struct Encoded<Str>(pub Str);
Expand description
Wrapper type that implements Display
. Encodes on the fly, without allocating.
Percent-encodes every byte except alphanumerics and -
, _
, .
, ~
. Assumes UTF-8 encoding.
use urlencoding::Encoded;
format!("{}", Encoded("hello!"));
Tuple Fields§
§0: Str
Implementations§
Trait Implementations§
source§impl<Str: Ord> Ord for Encoded<Str>
impl<Str: Ord> Ord for Encoded<Str>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<Str: PartialEq> PartialEq<Encoded<Str>> for Encoded<Str>
impl<Str: PartialEq> PartialEq<Encoded<Str>> for Encoded<Str>
source§impl<Str: PartialOrd> PartialOrd<Encoded<Str>> for Encoded<Str>
impl<Str: PartialOrd> PartialOrd<Encoded<Str>> for Encoded<Str>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more