19 #ifndef GRPC_CORE_LIB_SLICE_SLICE_UTILS_H
20 #define GRPC_CORE_LIB_SLICE_SLICE_UTILS_H
26 #include "absl/strings/string_view.h"
119 bool operator==(std::pair<const char*, size_t> buflen)
const {
142 void HeapInit(
size_t length);
155 reinterpret_cast<uint8_t*>(const_cast<void*>(s))) {}
176 const uint8_t* bytes) {
186 struct InternedSliceRefcount;
193 return absl::string_view(
#define GRPC_SLICE_START_PTR(slice)
Definition: slice.h:96
#define GRPC_SLICE_LENGTH(slice)
Definition: slice.h:99
uint32_t gpr_murmur_hash3(const void *key, size_t len, uint32_t seed)
Definition: murmur_hash.cc:34
Round Robin Policy.
Definition: backend_metric.cc:26
uint32_t g_hash_seed
Definition: slice_intern.cc:67
absl::string_view StringViewFromSlice(const grpc_slice &slice)
Definition: slice_utils.h:192
grpc_slice_refcount kNoopRefcount(grpc_slice_refcount::Type::NOP)
Definition: slice_internal.h:187
grpc_slice slice
Definition: server.cc:461
int grpc_slice_differs_refcounted(const grpc_slice &a, const grpc_slice &b_not_inline)
Definition: slice.cc:503
bool grpc_slice_eq_static_interned(const grpc_slice &a, const grpc_slice &b_static_interned)
Definition: slice_utils.h:53
Definition: slice_utils.h:147
bool operator==(const grpc_slice &other) const
Definition: slice_utils.h:162
ExternallyManagedSlice(grpc_slice_refcount *ref, size_t length, uint8_t *bytes)
Definition: slice_utils.h:156
ExternallyManagedSlice(const char *s)
Definition: slice_utils.h:150
ExternallyManagedSlice(const void *s, size_t len)
Definition: slice_utils.h:152
bool operator!=(const grpc_slice &other) const
Definition: slice_utils.h:167
uint32_t Hash()
Definition: slice_utils.h:168
ExternallyManagedSlice()
Definition: slice_utils.h:148
Definition: slice_utils.h:187
InternedSlice(InternedSliceRefcount *s)
Definition: slice_intern.cc:109
Definition: slice_internal.h:189
Definition: slice_utils.h:103
ManagedMemorySlice()
Definition: slice_utils.h:104
bool operator!=(const grpc_slice &other) const
Definition: slice_utils.h:118
bool operator==(std::pair< const char *, size_t > buflen) const
Definition: slice_utils.h:119
bool operator==(const grpc_slice &other) const
Definition: slice_utils.h:112
Definition: slice_utils.h:124
ForceHeapAllocation
Definition: slice_utils.h:126
UnmanagedMemorySlice(size_t length, const ForceHeapAllocation &)
Definition: slice_utils.h:137
UnmanagedMemorySlice()
Definition: slice_utils.h:127
uint8_t length
Definition: slice.h:68
size_t length
Definition: slice.h:64
uint8_t * bytes
Definition: slice.h:65
Definition: slice_internal.h:100
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60
struct grpc_slice_refcount * refcount
Definition: slice.h:61
union grpc_slice::grpc_slice_data data
struct grpc_slice::grpc_slice_data::grpc_slice_refcounted refcounted
struct grpc_slice::grpc_slice_data::grpc_slice_inlined inlined