#[non_exhaustive]pub enum TextEncoding {
Utf8,
Utf8Bom,
Utf16Le,
Utf16Be,
OpaqueBytes,
}Expand description
A text encoding that DecodedText can recognize and round-trip.
#[non_exhaustive]: more encodings may be added in future releases, so match with a wildcard
arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Utf8
UTF-8 with no byte-order mark.
Utf8Bom
UTF-8 prefixed with a byte-order mark, which is preserved on re-encoding.
Utf16Le
Little-endian UTF-16 (identified by its byte-order mark).
Utf16Be
Big-endian UTF-16 (identified by its byte-order mark).
OpaqueBytes
Bytes that could not be decoded as text and are passed through verbatim.
Trait Implementations§
Source§impl Clone for TextEncoding
impl Clone for TextEncoding
Source§fn clone(&self) -> TextEncoding
fn clone(&self) -> TextEncoding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextEncoding
Source§impl Debug for TextEncoding
impl Debug for TextEncoding
impl Eq for TextEncoding
Source§impl PartialEq for TextEncoding
impl PartialEq for TextEncoding
impl StructuralPartialEq for TextEncoding
Auto Trait Implementations§
impl Freeze for TextEncoding
impl RefUnwindSafe for TextEncoding
impl Send for TextEncoding
impl Sync for TextEncoding
impl Unpin for TextEncoding
impl UnsafeUnpin for TextEncoding
impl UnwindSafe for TextEncoding
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