pub struct Latin1Codec;Expand description
Single-byte ISO-8859-1 codec for bytes.
Latin1Codec converts between ISO-8859-1 bytes and Unicode scalar values.
Implementations§
Trait Implementations§
Source§impl CharsetCodec for Latin1Codec
impl CharsetCodec for Latin1Codec
Source§impl CharsetEncodeProbe for Latin1Codec
impl CharsetEncodeProbe for Latin1Codec
Source§fn encode_len(&self, ch: char, index: usize) -> CharsetEncodeResult<usize>
fn encode_len(&self, ch: char, index: usize) -> CharsetEncodeResult<usize>
Source§impl Clone for Latin1Codec
impl Clone for Latin1Codec
Source§fn clone(&self) -> Latin1Codec
fn clone(&self) -> Latin1Codec
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 moreSource§impl Codec for Latin1Codec
impl Codec for Latin1Codec
Source§type DecodeError = CharsetDecodeError
type DecodeError = CharsetDecodeError
Error reported when decoding malformed units.
Source§type EncodeError = CharsetEncodeError
type EncodeError = CharsetEncodeError
Error reported when encoding an unsupported value.
Source§fn min_units_per_value(&self) -> NonZeroUsize
fn min_units_per_value(&self) -> NonZeroUsize
Returns the minimum possible unit count for one encoded value. Read more
Source§fn max_units_per_value(&self) -> NonZeroUsize
fn max_units_per_value(&self) -> NonZeroUsize
Returns the maximum non-zero unit count needed to encode or decode one value. Read more
Source§unsafe fn decode_unchecked(
&self,
input: &[u8],
index: usize,
) -> CharsetDecodeResult<(char, NonZeroUsize)>
unsafe fn decode_unchecked( &self, input: &[u8], index: usize, ) -> CharsetDecodeResult<(char, NonZeroUsize)>
Source§unsafe fn encode_unchecked(
&self,
ch: &char,
output: &mut [u8],
index: usize,
) -> CharsetEncodeResult<usize>
unsafe fn encode_unchecked( &self, ch: &char, output: &mut [u8], index: usize, ) -> CharsetEncodeResult<usize>
impl Copy for Latin1Codec
Source§impl Debug for Latin1Codec
impl Debug for Latin1Codec
Source§impl Default for Latin1Codec
impl Default for Latin1Codec
Source§fn default() -> Latin1Codec
fn default() -> Latin1Codec
Returns the “default value” for a type. Read more
impl Eq for Latin1Codec
Source§impl Hash for Latin1Codec
impl Hash for Latin1Codec
Source§impl PartialEq for Latin1Codec
impl PartialEq for Latin1Codec
Source§fn eq(&self, other: &Latin1Codec) -> bool
fn eq(&self, other: &Latin1Codec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Latin1Codec
Auto Trait Implementations§
impl Freeze for Latin1Codec
impl RefUnwindSafe for Latin1Codec
impl Send for Latin1Codec
impl Sync for Latin1Codec
impl Unpin for Latin1Codec
impl UnsafeUnpin for Latin1Codec
impl UnwindSafe for Latin1Codec
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