pub enum TextEncoding {
Utf8,
Utf16Le,
Gbk,
Big5,
}Variants§
Implementations§
Source§impl TextEncoding
impl TextEncoding
pub fn for_container(kind: ContainerKind, header: &Header) -> Result<Self>
pub fn unit_size(self) -> usize
pub fn decode(self, bytes: &[u8], context: &'static str) -> Result<String>
pub fn split_terminated<'a>( self, bytes: &'a [u8], offset: usize, context: &'static str, ) -> Result<(&'a [u8], usize)>
pub fn normalize_key( self, key: &str, case_sensitive: bool, strip_key: bool, ) -> String
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
Source§fn eq(&self, other: &TextEncoding) -> bool
fn eq(&self, other: &TextEncoding) -> bool
Tests for
self and other values to be equal, and is used by ==.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