Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_CODEGEN_SLICE_H
20 #define GRPCPP_IMPL_CODEGEN_SLICE_H
156 #endif // GRPCPP_IMPL_CODEGEN_SLICE_H
Slice(void *buf, size_t len, void(*destroy)(void *, size_t))
Similar to the above but has a destroy that also takes slice length.
grpc::string_ref StringRefFromSlice(const grpc_slice *slice)
Slice sub(size_t begin, size_t end) const
Returns a substring of the slice as another slice.
const uint8_t * end() const
Raw pointer to the end (one byte past the last element) of the slice.
virtual void grpc_slice_unref(grpc_slice slice)=0
Slice(Slice &&other) noexcept
Move constructor, steals a reference.
~Slice()
Destructor - drops one reference.
Slice(grpc_slice slice, AddRef)
Construct a slice from slice, adding a reference.
grpc_slice SliceFromCopiedString(const std::string &str)
virtual grpc_slice grpc_empty_slice()=0
GPRAPI grpc_slice grpc_slice_malloc(size_t length)
virtual grpc_slice grpc_slice_ref(grpc_slice slice)=0
CoreCodegenInterface * g_core_codegen_interface
Slice(const std::string &str)
Construct a slice from a copied string.
def c_str(s, encoding='ascii')
Slice(const Slice &other)
Copy constructor, adds a reference.
Slice(size_t len)
Allocate a slice of specified size.
Slice(void *buf, size_t len, void(*destroy)(void *))
Specialization of above for common case where buf == user_data.
GPRAPI grpc_slice grpc_slice_from_static_buffer(const void *source, size_t len)
virtual grpc_slice grpc_slice_from_copied_buffer(const void *buffer, size_t length)=0
#define GRPC_SLICE_START_PTR(slice)
virtual grpc_slice grpc_slice_sub(grpc_slice s, size_t begin, size_t end)=0
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
GPRAPI grpc_slice grpc_empty_slice(void)
#define GRPC_SLICE_END_PTR(slice)
const uint8_t * begin() const
Raw pointer to the beginning (first element) of the slice.
size_t size() const
Byte size.
Slice & operator=(Slice other)
Assignment, reference count is unchanged.
#define GRPC_SLICE_LENGTH(slice)
GPRAPI grpc_slice grpc_slice_new_with_user_data(void *p, size_t len, void(*destroy)(void *), void *user_data)
virtual grpc_slice grpc_slice_from_static_buffer(const void *buffer, size_t length)=0
Slice()
Construct an empty slice.
GPRAPI grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len)
Slice(grpc_slice slice, StealRef)
Construct a slice from slice, stealing a reference.
grpc_slice c_slice() const
Raw C slice. Caller needs to call grpc_slice_unref when done.
Slice(const void *buf, size_t len, StaticSlice)
Construct a slice from a static buffer.
Slice(const void *buf, size_t len)
Construct a slice from a copied buffer.
Slice(void *buf, size_t len, void(*destroy)(void *), void *user_data)
static std::function< void(void *, Slot *)> destroy
GPRAPI grpc_slice grpc_slice_new_with_len(void *p, size_t len, void(*destroy)(void *, size_t))
std::string StringFromCopiedSlice(grpc_slice slice)
grpc_slice SliceReferencingString(const std::string &str)
GPRAPI grpc_slice grpc_slice_ref(grpc_slice s)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:13