pub enum TargetEncoding {
Utf8,
Utf8Bom,
Gb18030,
Utf16Le,
Utf16Be,
}Expand description
Encodings the tool can write.
Variants§
Utf8
UTF-8 without BOM (default; Playbook Strategy A).
Utf8Bom
UTF-8 with EF BB BF prepended.
Gb18030
GB18030 (superset of GB2312 / GBK).
Utf16Le
UTF-16 little endian with FF FE prepended.
Utf16Be
UTF-16 big endian with FE FF prepended.
Implementations§
Source§impl TargetEncoding
impl TargetEncoding
Sourcepub fn utf8_default() -> TargetEncoding
pub fn utf8_default() -> TargetEncoding
Default target: UTF-8 without BOM (invariant #1).
Sourcepub fn parse(s: &str) -> Option<TargetEncoding>
pub fn parse(s: &str) -> Option<TargetEncoding>
Parse a CLI value. Case-insensitive. Only canonical tags are accepted.
Trait Implementations§
Source§impl Clone for TargetEncoding
impl Clone for TargetEncoding
impl Copy for TargetEncoding
Source§impl Debug for TargetEncoding
impl Debug for TargetEncoding
Source§impl Default for TargetEncoding
impl Default for TargetEncoding
Source§impl Display for TargetEncoding
impl Display for TargetEncoding
impl Eq for TargetEncoding
Source§impl FromStr for TargetEncoding
impl FromStr for TargetEncoding
Source§impl Hash for TargetEncoding
impl Hash for TargetEncoding
Source§impl PartialEq for TargetEncoding
impl PartialEq for TargetEncoding
impl StructuralPartialEq for TargetEncoding
Auto Trait Implementations§
impl Freeze for TargetEncoding
impl RefUnwindSafe for TargetEncoding
impl Send for TargetEncoding
impl Sync for TargetEncoding
impl Unpin for TargetEncoding
impl UnsafeUnpin for TargetEncoding
impl UnwindSafe for TargetEncoding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more