Motr  M0
m0_xcode_type_ops Struct Reference

#include <xcode.h>

Collaboration diagram for m0_xcode_type_ops:
Collaboration graph

Data Fields

int(* xto_length )(struct m0_xcode_ctx *ctx, const void *obj)
 
int(* xto_encode )(struct m0_xcode_ctx *ctx, const void *obj)
 
int(* xto_decode )(struct m0_xcode_ctx *ctx, void *obj)
 
int(* xto_read )(const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)
 

Detailed Description

Custom xcoding functions.

User provides these functions (which are all optional) to use non-standard xcoding.

See also
m0_xcode_decode()

Definition at line 364 of file xcode.h.

Field Documentation

◆ xto_decode

int(* xto_decode) (struct m0_xcode_ctx *ctx, void *obj)

Definition at line 367 of file xcode.h.

◆ xto_encode

int(* xto_encode) (struct m0_xcode_ctx *ctx, const void *obj)

Definition at line 366 of file xcode.h.

◆ xto_length

int(* xto_length) (struct m0_xcode_ctx *ctx, const void *obj)

Definition at line 365 of file xcode.h.

◆ xto_read

int(* xto_read) (const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)

Call-back invoked by m0_xcode_read() to read custom object representation.

Returns number of bytes consumed from the string, or negative error code. obj->xo_ptr of suitable size is allocated by m0_xcode_read(), obj->xo_type is assigned. The call-back should fill obj->xo_ptr fields.

See also
string_literal().

Definition at line 379 of file xcode.h.


The documentation for this struct was generated from the following file: