pub struct DecodeError { /* private fields */ }
Expand description
The error returned by EncodedParamValue::decode
when the percent-decoded path parameter
is not a valid UTF8 string.
Path parameters must be percent-encoded whenever they contain characters that are not URL safe—e.g. whitespaces. This error is returned whenever the percent-decoding step fails—i.e. the decoded data is not a valid UTF8 string.
§Example
You might try to percent-decode dirty%DE~%C7%1FY
.
When decoded, it is a sequence of bytes that cannot be interpreted as a well-formed UTF8 string.
This error is then returned.
Trait Implementations§
source§impl Debug for DecodeError
impl Debug for DecodeError
source§impl Display for DecodeError
impl Display for DecodeError
source§impl Error for DecodeError
impl Error for DecodeError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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