GRPC Core  6.0.0
Data Fields
grpc_slice_refcount_vtable Struct Reference

Slice API. More...

#include <slice.h>

Data Fields

void(* ref )(void *)
 
void(* unref )(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

◆ eq

int(* grpc_slice_refcount_vtable::eq) (grpc_slice a, grpc_slice b)

◆ hash

uint32_t(* grpc_slice_refcount_vtable::hash) (grpc_slice slice)

◆ ref

void(* grpc_slice_refcount_vtable::ref) (void *)

◆ unref

void(* grpc_slice_refcount_vtable::unref) (void *)

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