Go to the documentation of this file.
15 #ifndef GRPC_CORE_LIB_SLICE_SLICE_H
16 #define GRPC_CORE_LIB_SLICE_SLICE_H
26 #include "absl/strings/string_view.h"
56 namespace slice_detail {
140 return a.as_string_view() ==
b;
144 return a.as_string_view() !=
b;
148 return a ==
b.as_string_view();
152 return a !=
b.as_string_view();
171 template <
typename Out>
186 template <
typename Buffer>
199 template <
typename Out>
389 #endif // GRPC_CORE_LIB_SLICE_SLICE_H
BaseSlice(const grpc_slice &slice)
static Out FromCopiedString(std::string s)
Slice Split(size_t split)
Slice(Slice &&other) noexcept
void SetCSlice(const grpc_slice &slice)
struct grpc_slice_refcount * refcount
const grpc_slice & grpc_slice_ref_internal(const grpc_slice &slice)
#define GPR_DEBUG_ASSERT(x)
StaticSlice & operator=(const StaticSlice &other)
MutableSlice(MutableSlice &&other) noexcept
uint8_t & operator[](size_t i)
static Out FromStaticString(const char *s)
Slice(slice_detail::BaseSlice &&other)
const uint8_t * cend() const
grpc_slice * c_slice_ptr()
GPRAPI grpc_slice grpc_slice_sub(grpc_slice s, size_t begin, size_t end)
BaseSlice & operator=(const BaseSlice &)=delete
GPRAPI grpc_slice grpc_slice_sub_no_ref(grpc_slice s, size_t begin, size_t end)
uint8_t operator[](size_t i) const
GPRAPI grpc_slice grpc_slice_malloc(size_t length)
const uint8_t * cbegin() const
bool operator!=(const BaseSlice &a, const BaseSlice &b)
StaticSlice(const StaticSlice &other)
static MutableSlice CreateUninitialized(size_t length)
static grpc_slice_refcount * NoopRefcount()
static Out FromCopiedString(const char *s)
GPRAPI int grpc_slice_is_equivalent(grpc_slice a, grpc_slice b)
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
const uint8_t * begin() const
#define GPR_LTOA_MIN_BUFSIZE
static Out FromCopiedBuffer(const char *p, size_t len)
Slice TakeSubSlice(size_t pos, size_t n)
static constexpr grpc_slice EmptySlice()
const grpc_slice & c_slice() const
static Out FromCopiedString(absl::string_view s)
Slice RefSubSlice(size_t pos, size_t n) const
#define GRPC_SLICE_START_PTR(slice)
const uint8_t * data() const
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
static Slice FromRefcountAndBytes(grpc_slice_refcount *r, const uint8_t *begin, const uint8_t *end)
absl::string_view as_string_view() const
#define GRPC_SLICE_END_PTR(slice)
StaticSlice & operator=(StaticSlice &&other) noexcept
#define GRPC_SLICE_LENGTH(slice)
static Out FromInt64(int64_t i)
Slice & operator=(Slice &&other) noexcept
struct grpc_slice::grpc_slice_data::grpc_slice_refcounted refcounted
GPRAPI grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len)
static Out FromStaticBuffer(const void *s, size_t len)
static Out FromCopiedBuffer(const Buffer &buffer)
bool operator==(const BaseSlice &a, const BaseSlice &b)
static Slice FromExternalString(absl::string_view str)
MutableSlice TakeMutable()
absl::string_view string_view
union grpc_slice::grpc_slice_data data
const uint8_t * end() const
uint32_t grpc_slice_hash_internal(const grpc_slice &s)
grpc_slice grpc_slice_from_cpp_string(std::string str)
void Swap(BaseSlice *other)
static Out FromStaticString(absl::string_view s)
Slice(const grpc_slice &slice)
MutableSlice & operator=(MutableSlice &&other) noexcept
StaticSlice(const grpc_slice &slice)
MutableSlice(const grpc_slice &slice)
MutableSlice TakeSubSlice(size_t pos, size_t n)
Slice & operator=(const Slice &)=delete
MutableSlice & operator=(const MutableSlice &)=delete
static void split(const char *s, char ***ss, size_t *ns)
StaticSlice(StaticSlice &&other) noexcept
bool is_equivalent(const BaseSlice &other) const
GPRAPI int grpc_slice_eq(grpc_slice a, grpc_slice b)
void grpc_slice_unref_internal(const grpc_slice &slice)
GPRAPI grpc_slice grpc_slice_split_tail(grpc_slice *s, size_t split)
int gpr_ltoa(long value, char *output)
GPRAPI grpc_slice grpc_slice_copy(grpc_slice s)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:13