Function encoding_c::encoder_encode_from_utf8_without_replacement [] [src]

#[no_mangle]
pub unsafe extern "C" fn encoder_encode_from_utf8_without_replacement(
    encoder: *mut Encoder,
    src: *const u8,
    src_len: *mut usize,
    dst: *mut u8,
    dst_len: *mut usize,
    last: bool
) -> u32

Incrementally encode into byte stream from UTF-8 without replacement.

See the top-level FFI documentation for documentation for how the encoder_encode_* functions are mapped from Rust and the documentation for the Encoder struct for the semantics.

The input absolutely MUST be valid UTF-8 or the behavior is memory-unsafe! If in doubt, check the validity of input before using!

src must be non-NULL even if src_len is zero. Whensrc_len is zero, it is OK for src to be something non-dereferencable, such as 0x1. Likewise for dst when dst_len is zero. This is required due to Rust's optimization for slices within Option.

Undefined behavior

UB ensues if any of the pointer arguments is NULL, src and src_len don't designate a valid block of memory or dst and dst_len don't designate a valid block of memory.