pub trait EncodeSet: Clone {
// Required method
fn contains(&self, byte: u8) -> bool;
}
Expand description
Represents a set of characters / bytes that should be percent-encoded.
See encode sets specification.
Different characters need to be encoded in different parts of an URL.
For example, a literal ?
question mark in an URL’s path would indicate
the start of the query string.
A question mark meant to be part of the path therefore needs to be percent-encoded.
In the query string however, a question mark does not have any special meaning
and does not need to be percent-encoded.
A few sets are defined in this module.
Use the define_encode_set!
macro to define different ones.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.