Function pm_pack_parse

Source
pub unsafe extern "C" fn pm_pack_parse(
    variant: pm_pack_variant,
    format: *mut *const c_char,
    format_end: *const c_char,
    type_: *mut pm_pack_type,
    signed_type: *mut pm_pack_signed,
    endian: *mut pm_pack_endian,
    size: *mut pm_pack_size,
    length_type: *mut pm_pack_length_type,
    length: *mut u64,
    encoding: *mut pm_pack_encoding,
) -> pm_pack_result
Expand description

Parse a single directive from a pack or unpack format string.

@param variant (in) pack or unpack @param format (in, out) the start of the next directive to parse on calling, and advanced beyond the parsed directive on return, or as much of it as was consumed until an error was encountered @param format_end (in) the end of the format string @param type (out) the type of the directive @param signed_type (out) whether the value is signed @param endian (out) the endianness of the value @param size (out) the size of the value @param length_type (out) what kind of length is specified @param length (out) the length of the directive @param encoding (in, out) takes the current encoding of the string which would result from parsing the whole format string, and returns a possibly changed directive - the encoding should be PM_PACK_ENCODING_START when pm_pack_parse is called for the first directive in a format string

@return PM_PACK_OK on success or PM_PACK_ERROR_* on error @note Consult Ruby documentation for the meaning of directives.