pub enum OutputCharset {
Utf8,
Latin1,
Ascii,
}Expand description
The charset the serialized bytes will ultimately be encoded into.
Characters the charset cannot represent are emitted as numeric
character references (&#N;) in text / attribute content, matching
libxml2’s serializer: a non-UTF-8 output encoding escapes anything
outside its repertoire rather than dropping or mis-encoding it.
Variants§
Utf8
Every Unicode scalar value is representable (UTF-8/16/32 output).
Latin1
ISO-8859-1: code points <= 0xFF pass through; the rest escape.
Ascii
US-ASCII: code points <= 0x7F pass through; the rest escape.
Also the effective charset when no output encoding is requested
(libxml2’s default serialization escapes non-ASCII).
Trait Implementations§
Source§impl Clone for OutputCharset
impl Clone for OutputCharset
Source§fn clone(&self) -> OutputCharset
fn clone(&self) -> OutputCharset
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 OutputCharset
Source§impl Debug for OutputCharset
impl Debug for OutputCharset
Source§impl Default for OutputCharset
impl Default for OutputCharset
Source§fn default() -> OutputCharset
fn default() -> OutputCharset
Returns the “default value” for a type. Read more
impl Eq for OutputCharset
Source§impl PartialEq for OutputCharset
impl PartialEq for OutputCharset
Source§fn eq(&self, other: &OutputCharset) -> bool
fn eq(&self, other: &OutputCharset) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OutputCharset
Auto Trait Implementations§
impl Freeze for OutputCharset
impl RefUnwindSafe for OutputCharset
impl Send for OutputCharset
impl Sync for OutputCharset
impl Unpin for OutputCharset
impl UnsafeUnpin for OutputCharset
impl UnwindSafe for OutputCharset
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