pub struct PercentCodec;Expand description
Encodes and decodes percent-encoded UTF-8 text.
Implementations§
Source§impl PercentCodec
impl PercentCodec
Sourcepub fn decode(&self, text: &str) -> CodecResult<String>
pub fn decode(&self, text: &str) -> CodecResult<String>
Decodes percent-encoded UTF-8 text.
§Parameters
text: Percent-encoded text.
§Returns
Decoded UTF-8 text.
§Errors
Returns CodecError when a percent escape is malformed or decoded
bytes are not valid UTF-8.
Trait Implementations§
Source§impl Clone for PercentCodec
impl Clone for PercentCodec
Source§fn clone(&self) -> PercentCodec
fn clone(&self) -> PercentCodec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PercentCodec
impl Debug for PercentCodec
Source§impl Decoder<str> for PercentCodec
impl Decoder<str> for PercentCodec
Source§impl Default for PercentCodec
impl Default for PercentCodec
Source§fn default() -> PercentCodec
fn default() -> PercentCodec
Returns the “default value” for a type. Read more
Source§impl Encoder<str> for PercentCodec
impl Encoder<str> for PercentCodec
Source§impl PartialEq for PercentCodec
impl PartialEq for PercentCodec
impl Copy for PercentCodec
impl Eq for PercentCodec
impl StructuralPartialEq for PercentCodec
Auto Trait Implementations§
impl Freeze for PercentCodec
impl RefUnwindSafe for PercentCodec
impl Send for PercentCodec
impl Sync for PercentCodec
impl Unpin for PercentCodec
impl UnsafeUnpin for PercentCodec
impl UnwindSafe for PercentCodec
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