librpc
Functions
serializer.h File Reference
#include <rpc/object.h>
Include dependency graph for serializer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool rpc_serializer_exists (const char *_Nonnull serializer)
 
_Nullable rpc_object_t rpc_serializer_load (const char *_Nonnull serializer, const void *_Nonnull frame, size_t len)
 
int rpc_serializer_dump (const char *_Nonnull serializer, _Nonnull rpc_object_t obj, void *_Nullable *_Nonnull framep, size_t *_Nullable lenp)
 

Function Documentation

◆ rpc_serializer_dump()

int rpc_serializer_dump ( const char *_Nonnull  serializer,
_Nonnull rpc_object_t  obj,
void *_Nullable *_Nonnull  framep,
size_t *_Nullable  lenp 
)

Dumps an RPC object into a serialized blob form.

Parameters
serializerSerializer type (msgpack, json or yaml)
framepPointer to a variable holding blob pointer
lenpPointer to a variable holding resulting blob length
Returns
0 on success, -1 on error

◆ rpc_serializer_exists()

bool rpc_serializer_exists ( const char *_Nonnull  serializer)

Checks whether specified serializer is available.

Parameters
serializerSerializer name
Returns
true if specified serializer exists, otherwise false

◆ rpc_serializer_load()

_Nullable rpc_object_t rpc_serializer_load ( const char *_Nonnull  serializer,
const void *_Nonnull  frame,
size_t  len 
)

Loads an RPC object from a serialized blob.

Parameters
serializerSerializer type (msgpack, json or yaml)
frameBlob pointer
lenBlob length
Returns
RPC object or NULL in case of error.