|
| Slice () |
| Construct an empty slice. More...
|
|
| ~Slice () |
| Destructor - drops one reference. More...
|
|
| Slice (grpc_slice slice, AddRef) |
| Construct a slice from slice, adding a reference. More...
|
|
| Slice (grpc_slice slice, StealRef) |
| Construct a slice from slice, stealing a reference. More...
|
|
| Slice (size_t len) |
| Allocate a slice of specified size. More...
|
|
| Slice (const void *buf, size_t len) |
| Construct a slice from a copied buffer. More...
|
|
| Slice (const std::string &str) |
| Construct a slice from a copied string. More...
|
|
| Slice (const void *buf, size_t len, StaticSlice) |
| Construct a slice from a static buffer. More...
|
|
| Slice (const Slice &other) |
| Copy constructor, adds a reference. More...
|
|
| Slice (Slice &&other) noexcept |
| Move constructor, steals a reference. More...
|
|
Slice & | operator= (Slice other) |
| Assignment, reference count is unchanged. More...
|
|
| Slice (void *buf, size_t len, void(*destroy)(void *), void *user_data) |
| Create a slice pointing at some data. More...
|
|
| Slice (void *buf, size_t len, void(*destroy)(void *)) |
| Specialization of above for common case where buf == user_data. More...
|
|
| Slice (void *buf, size_t len, void(*destroy)(void *, size_t)) |
| Similar to the above but has a destroy that also takes slice length. More...
|
|
size_t | size () const |
| Byte size. More...
|
|
const uint8_t * | begin () const |
| Raw pointer to the beginning (first element) of the slice. More...
|
|
const uint8_t * | end () const |
| Raw pointer to the end (one byte past the last element) of the slice. More...
|
|
Slice | sub (size_t begin, size_t end) const |
| Returns a substring of the slice as another slice. More...
|
|
grpc_slice | c_slice () const |
| Raw C slice. Caller needs to call grpc_slice_unref when done. More...
|
|
A wrapper around grpc_slice.
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.