19 #ifndef GRPCPP_IMPL_CODEGEN_SLICE_H 20 #define GRPCPP_IMPL_CODEGEN_SLICE_H 54 Slice(
const void* buf,
size_t len);
69 std::swap(slice_, other.slice_);
78 Slice(
void* buf,
size_t len,
void (*destroy)(
void*),
void* user_data);
81 Slice(
void* buf,
size_t len,
void (*destroy)(
void*))
82 :
Slice(buf, len, destroy, buf) {}
85 Slice(
void* buf,
size_t len,
void (*destroy)(
void*,
size_t));
128 #endif // GRPCPP_IMPL_CODEGEN_SLICE_H
grpc_slice c_slice() const
Raw C slice. Caller needs to call grpc_slice_unref when done.
~Slice()
Destructor - drops one reference.
StaticSlice
Definition: slice.h:59
grpc::string StringFromCopiedSlice(grpc_slice slice)
Definition: slice.h:111
std::string string
Definition: config.h:35
StealRef
Definition: slice.h:46
grpc::string_ref StringRefFromSlice(const grpc_slice *slice)
Definition: slice.h:105
const uint8_t * end() const
Raw pointer to the end (one byte past the last element) of the slice.
Definition: slice.h:94
virtual grpc_slice grpc_slice_from_copied_buffer(const void *buffer, size_t length)=0
A wrapper around grpc_slice.
Definition: slice.h:35
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1]. ...
Definition: slice.h:80
const uint8_t * begin() const
Raw pointer to the beginning (first element) of the slice.
Definition: slice.h:91
grpc_slice SliceReferencingString(const grpc::string &str)
Definition: slice.h:116
#define GRPC_SLICE_START_PTR(slice)
Definition: slice.h:116
#define GRPC_SLICE_END_PTR(slice)
Definition: slice.h:125
size_t size() const
Byte size.
Definition: slice.h:88
grpc_slice SliceFromCopiedString(const grpc::string &str)
Definition: slice.h:121
virtual grpc_slice grpc_slice_from_static_buffer(const void *buffer, size_t length)=0
Slice()
Construct an empty slice.
An Alarm posts the user provided tag to its associated completion queue upon expiry or cancellation...
Definition: alarm.h:31
Slice(void *buf, size_t len, void(*destroy)(void *))
Specialization of above for common case where buf == user_data.
Definition: slice.h:81
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:46
This class is a non owning reference to a string.
Definition: string_ref.h:41
#define GRPC_SLICE_LENGTH(slice)
Definition: slice.h:119
Slice & operator=(Slice other)
Assignment, reference count is unchanged.
Definition: slice.h:68
AddRef
Definition: slice.h:42
A sequence of bytes.
Definition: byte_buffer.h:50