diff options
Diffstat (limited to 'include/grpc++/support/slice.h')
-rw-r--r-- | include/grpc++/support/slice.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index db5cf942a0..0b4ba7cecb 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -44,6 +44,20 @@ class Slice final { /// Construct a slice from \a slice, stealing a reference. Slice(grpc_slice slice, StealRef); + /// Allocate a slice of specified size + Slice(size_t len); + + /// Construct a slice from a copied buffer + Slice(const void* buf, size_t len); + + /// Construct a slice from a copied string + Slice(const grpc::string& str); + + enum StaticSlice { STATIC_SLICE }; + + /// Construct a slice from a static buffer + Slice(const void* buf, size_t len, StaticSlice); + /// Copy constructor, adds a reference. Slice(const Slice& other); |