Struct mariadb_sys::my_charset_handler_st
source · #[repr(C)]pub struct my_charset_handler_st {Show 29 fields
pub init: Option<unsafe extern "C" fn(arg1: *mut charset_info_st, loader: *mut MY_CHARSET_LOADER) -> my_bool>,
pub numchars: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char) -> usize>,
pub charpos: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char, pos: usize) -> usize>,
pub lengthsp: Option<unsafe extern "C" fn(arg1: *const charset_info_st, ptr: *const c_char, length: usize) -> usize>,
pub numcells: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char) -> usize>,
pub mb_wc: my_charset_conv_mb_wc,
pub wc_mb: my_charset_conv_wc_mb,
pub ctype: Option<unsafe extern "C" fn(cs: *const charset_info_st, ctype: *mut c_int, s: *const uchar, e: *const uchar) -> c_int>,
pub caseup: my_charset_conv_case,
pub casedn: my_charset_conv_case,
pub snprintf: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, n: usize, fmt: *const c_char, ...) -> usize>,
pub long10_to_str: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, n: usize, radix: c_int, val: c_long) -> usize>,
pub longlong10_to_str: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, n: usize, radix: c_int, val: longlong) -> usize>,
pub fill: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, len: usize, fill: c_int)>,
pub strntol: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> c_long>,
pub strntoul: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> ulong>,
pub strntoll: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> longlong>,
pub strntoull: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> ulonglong>,
pub strntod: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *mut c_char, l: usize, e: *mut *mut c_char, err: *mut c_int) -> f64>,
pub strtoll10: Option<unsafe extern "C" fn(cs: *const charset_info_st, nptr: *const c_char, endptr: *mut *mut c_char, error: *mut c_int) -> longlong>,
pub strntoull10rnd: Option<unsafe extern "C" fn(cs: *const charset_info_st, str_: *const c_char, length: usize, unsigned_fl: c_int, endptr: *mut *mut c_char, error: *mut c_int) -> ulonglong>,
pub scan: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char, sq: c_int) -> usize>,
pub charlen: Option<unsafe extern "C" fn(cs: *const charset_info_st, str_: *const uchar, end: *const uchar) -> c_int>,
pub well_formed_char_length: Option<unsafe extern "C" fn(cs: *const charset_info_st, str_: *const c_char, end: *const c_char, nchars: usize, status: *mut MY_STRCOPY_STATUS) -> usize>,
pub copy_fix: Option<unsafe extern "C" fn(arg1: *const charset_info_st, dst: *mut c_char, dst_length: usize, src: *const c_char, src_length: usize, nchars: usize, status: *mut MY_STRCOPY_STATUS) -> usize>,
pub native_to_mb: my_charset_conv_wc_mb,
pub wc_to_printable: my_charset_conv_wc_mb,
pub caseup_multiply: Option<unsafe extern "C" fn(cs: *const charset_info_st) -> uint>,
pub casedn_multiply: Option<unsafe extern "C" fn(cs: *const charset_info_st) -> uint>,
}
Fields§
§init: Option<unsafe extern "C" fn(arg1: *mut charset_info_st, loader: *mut MY_CHARSET_LOADER) -> my_bool>
§numchars: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char) -> usize>
§charpos: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char, pos: usize) -> usize>
§lengthsp: Option<unsafe extern "C" fn(arg1: *const charset_info_st, ptr: *const c_char, length: usize) -> usize>
§numcells: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char) -> usize>
§mb_wc: my_charset_conv_mb_wc
§wc_mb: my_charset_conv_wc_mb
§ctype: Option<unsafe extern "C" fn(cs: *const charset_info_st, ctype: *mut c_int, s: *const uchar, e: *const uchar) -> c_int>
§caseup: my_charset_conv_case
§casedn: my_charset_conv_case
§snprintf: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, n: usize, fmt: *const c_char, ...) -> usize>
§long10_to_str: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, n: usize, radix: c_int, val: c_long) -> usize>
§longlong10_to_str: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, n: usize, radix: c_int, val: longlong) -> usize>
§fill: Option<unsafe extern "C" fn(arg1: *const charset_info_st, to: *mut c_char, len: usize, fill: c_int)>
§strntol: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> c_long>
§strntoul: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> ulong>
§strntoll: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> longlong>
§strntoull: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *const c_char, l: usize, base: c_int, e: *mut *mut c_char, err: *mut c_int) -> ulonglong>
§strntod: Option<unsafe extern "C" fn(arg1: *const charset_info_st, s: *mut c_char, l: usize, e: *mut *mut c_char, err: *mut c_int) -> f64>
§strtoll10: Option<unsafe extern "C" fn(cs: *const charset_info_st, nptr: *const c_char, endptr: *mut *mut c_char, error: *mut c_int) -> longlong>
§strntoull10rnd: Option<unsafe extern "C" fn(cs: *const charset_info_st, str_: *const c_char, length: usize, unsigned_fl: c_int, endptr: *mut *mut c_char, error: *mut c_int) -> ulonglong>
§scan: Option<unsafe extern "C" fn(arg1: *const charset_info_st, b: *const c_char, e: *const c_char, sq: c_int) -> usize>
§charlen: Option<unsafe extern "C" fn(cs: *const charset_info_st, str_: *const uchar, end: *const uchar) -> c_int>
§well_formed_char_length: Option<unsafe extern "C" fn(cs: *const charset_info_st, str_: *const c_char, end: *const c_char, nchars: usize, status: *mut MY_STRCOPY_STATUS) -> usize>
§copy_fix: Option<unsafe extern "C" fn(arg1: *const charset_info_st, dst: *mut c_char, dst_length: usize, src: *const c_char, src_length: usize, nchars: usize, status: *mut MY_STRCOPY_STATUS) -> usize>
§native_to_mb: my_charset_conv_wc_mb
Write a character to the target string, using its native code. For Unicode character sets (utf8, ucs2, utf16, utf16le, utf32, filename) native codes are equivalent to Unicode code points. For 8bit character sets the native code is just the byte value. For Asian characters sets:
- MB1 native code is just the byte value (e.g. on the ASCII range)
- MB2 native code is ((b0 << 8) + b1).
- MB3 native code is ((b0 <<16) + (b1 << 8) + b2) Note, CHARSET_INFO::min_sort_char and CHARSET_INFO::max_sort_char are defined in native notation and should be written using my_ci_native_to_mb() rather than my_ci_wc_mb().
wc_to_printable: my_charset_conv_wc_mb
§caseup_multiply: Option<unsafe extern "C" fn(cs: *const charset_info_st) -> uint>
§casedn_multiply: Option<unsafe extern "C" fn(cs: *const charset_info_st) -> uint>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for my_charset_handler_st
impl Send for my_charset_handler_st
impl Sync for my_charset_handler_st
impl Unpin for my_charset_handler_st
impl UnwindSafe for my_charset_handler_st
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