GRPC Core  4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
grpc_slice_refcount_vtable Struct Reference

Slice API. More...

#include <slice.h>

Data Fields

void(* ref )(void *)
 
void(* unref )(grpc_exec_ctx *exec_ctx, void *)
 
int(* eq )(grpc_slice a, grpc_slice b)
 
uint32_t(* hash )(grpc_slice slice)
 

Detailed Description

Slice API.

A slice represents a contiguous reference counted array of bytes. It is cheap to take references to a slice, and it is cheap to create a slice pointing to a subset of another slice.

The data-structure for slices is exposed here to allow non-gpr code to build slices from whatever data they have available.

When defining interfaces that handle slices, care should be taken to define reference ownership semantics (who should call unref?) and mutability constraints (is the callee allowed to modify the slice?)

Field Documentation

int(* grpc_slice_refcount_vtable::eq)(grpc_slice a, grpc_slice b)
uint32_t(* grpc_slice_refcount_vtable::hash)(grpc_slice slice)
void(* grpc_slice_refcount_vtable::ref)(void *)
void(* grpc_slice_refcount_vtable::unref)(grpc_exec_ctx *exec_ctx, void *)

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