pub struct GbkConverter;
Implementations§
Source§impl GbkConverter
impl GbkConverter
pub fn gb18030_to_utf8(bytes: &[u8]) -> CtpResult<String>
pub fn utf8_to_gb18030(utf8_str: &str) -> CtpResult<Vec<u8>>
pub fn utf8_to_gb18030_cstring(utf8_str: &str) -> CtpResult<CString>
pub unsafe fn cstring_to_utf8(ptr: *const i8) -> CtpResult<String>
pub fn fixed_bytes_to_utf8<const N: usize>(bytes: &[u8; N]) -> CtpResult<String>
pub fn utf8_to_fixed_bytes<const N: usize>(utf8_str: &str) -> CtpResult<[u8; N]>
Auto Trait Implementations§
impl Freeze for GbkConverter
impl RefUnwindSafe for GbkConverter
impl Send for GbkConverter
impl Sync for GbkConverter
impl Unpin for GbkConverter
impl UnwindSafe for GbkConverter
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