Struct imageflow::JsonResponse [] [src]

#[repr(C)]
pub struct JsonResponse { pub status_code: i64, pub buffer_utf8_no_nulls: *const u8, pub buffer_size: usize, }

ImaeflowJsonResponse contains a buffer and buffer length (in bytes), as well as a status code The status code can be used to avoid actual parsing of the response in some cases. For example, you may not care about parsing an error message if you're hacking around - Or, you may not care about success details if you were sending a command that doesn't imply a result.

The contents of the buffer MAY NOT include any null characters. The contents of the buffer MUST be a valid UTF-8 byte sequence. The contents of the buffer MUST be valid JSON per RFC 7159.

The schema of the JSON response is not globally defined; consult the API methods in use.

Use imageflow_json_response_destroy to free (it will otherwise remain on the heap and tracking list until the context is destroyed).

Use imageflow_context_read_response to access

Fields