pub trait EncodingSupport {
    type Encoding;
    // Required methods
    fn from_label(ascii_label: &[u8]) -> Option<Self::Encoding>;
    fn utf8() -> Self::Encoding;
    fn is_utf16_be_or_le(encoding: &Self::Encoding) -> bool;
}Expand description
Abstraction for avoiding a dependency from cssparser to an encoding library
Required Associated Types§
Required Methods§
Sourcefn from_label(ascii_label: &[u8]) -> Option<Self::Encoding>
 
fn from_label(ascii_label: &[u8]) -> Option<Self::Encoding>
https://encoding.spec.whatwg.org/#concept-encoding-get
Sourcefn is_utf16_be_or_le(encoding: &Self::Encoding) -> bool
 
fn is_utf16_be_or_le(encoding: &Self::Encoding) -> bool
Whether the given encoding is UTF-16BE or UTF-16LE
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.