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 moreimpl<Str: Copy> Copy for Encoded<Str>
impl<Str: Eq> Eq for Encoded<Str>
impl<Str> StructuralEq for Encoded<Str>
impl<Str> StructuralPartialEq for Encoded<Str>
Auto Trait Implementations§
impl<Str> RefUnwindSafe for Encoded<Str>where Str: RefUnwindSafe,
impl<Str> Send for Encoded<Str>where Str: Send,
impl<Str> Sync for Encoded<Str>where Str: Sync,
impl<Str> Unpin for Encoded<Str>where Str: Unpin,
impl<Str> UnwindSafe for Encoded<Str>where Str: UnwindSafe,
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