Function encoding_rs::ffi::encoding_new_encoder
[−]
[src]
pub unsafe extern fn encoding_new_encoder(encoding: *const Encoding) -> *mut Encoder
Allocates a new Encoder
for the given Encoding
on the heap and returns a
pointer to the newly-allocated Encoder
. (Exception, if the Encoding
is
replacement
, a new Decoder
for UTF-8 is instantiated (and that
Decoder
reports UTF_8
as its Encoding
).
Once the allocated Encoder
is no longer needed, the caller MUST
deallocate it by passing the pointer returned by this function to
encoder_free()
.