Struct encoding_rs::single_byte::SingleByteEncoder
source · pub struct SingleByteEncoder {
table: &'static [u16; 128],
run_bmp_offset: usize,
run_byte_offset: usize,
run_length: usize,
}
Fields§
§table: &'static [u16; 128]
§run_bmp_offset: usize
§run_byte_offset: usize
§run_length: usize
Implementations§
source§impl SingleByteEncoder
impl SingleByteEncoder
pub fn new( encoding: &'static Encoding, data: &'static [u16; 128], run_bmp_offset: u16, run_byte_offset: u8, run_length: u8, ) -> Encoder
pub fn max_buffer_length_from_utf16_without_replacement( &self, u16_length: usize, ) -> Option<usize>
pub fn max_buffer_length_from_utf8_without_replacement( &self, byte_length: usize, ) -> Option<usize>
fn encode_u16(&self, code_unit: u16) -> Option<u8>
pub fn encode_from_utf8_raw( &mut self, src: &str, dst: &mut [u8], _last: bool, ) -> (EncoderResult, usize, usize)
pub fn encode_from_utf16_raw( &mut self, src: &[u16], dst: &mut [u8], _last: bool, ) -> (EncoderResult, usize, usize)
Auto Trait Implementations§
impl Freeze for SingleByteEncoder
impl RefUnwindSafe for SingleByteEncoder
impl Send for SingleByteEncoder
impl Sync for SingleByteEncoder
impl Unpin for SingleByteEncoder
impl UnwindSafe for SingleByteEncoder
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