Public Member Functions | Static Public Member Functions | List of all members
grpc_core::Slice Class Reference

#include <slice.h>

Inheritance diagram for grpc_core::Slice:
Inheritance graph
[legend]

Public Member Functions

Slice AsOwned () const
 
Slice Copy () const
 
Sliceoperator= (const Slice &)=delete
 
Sliceoperator= (Slice &&other) noexcept
 
Slice Ref () const
 
Slice RefSubSlice (size_t pos, size_t n) const
 
 Slice ()=default
 
 Slice (const grpc_slice &slice)
 
 Slice (const Slice &)=delete
 
 Slice (Slice &&other) noexcept
 
 Slice (slice_detail::BaseSlice &&other)
 
Slice Split (size_t split)
 
MutableSlice TakeMutable ()
 
Slice TakeOwned ()
 
Slice TakeSubSlice (size_t pos, size_t n)
 
 ~Slice ()
 
- Public Member Functions inherited from grpc_core::slice_detail::BaseSlice
absl::string_view as_string_view () const
 
 BaseSlice (BaseSlice &&other)=delete
 
 BaseSlice (const BaseSlice &)=delete
 
const uint8_tbegin () const
 
const grpc_slicec_slice () const
 
const uint8_tcbegin () const
 
const uint8_tcend () const
 
const uint8_tdata () const
 
bool empty () const
 
const uint8_tend () const
 
uint32_t Hash () const
 
bool is_equivalent (const BaseSlice &other) const
 
size_t length () const
 
BaseSliceoperator= (BaseSlice &&other)=delete
 
BaseSliceoperator= (const BaseSlice &)=delete
 
uint8_t operator[] (size_t i) const
 
size_t size () const
 
grpc_slice TakeCSlice ()
 

Static Public Member Functions

static Slice FromExternalString (absl::string_view str)
 
static Slice FromRefcountAndBytes (grpc_slice_refcount *r, const uint8_t *begin, const uint8_t *end)
 
- Static Public Member Functions inherited from grpc_core::slice_detail::CopyConstructors< Slice >
static Slice FromCopiedBuffer (const Buffer &buffer)
 
static Slice FromCopiedBuffer (const char *p, size_t len)
 
static Slice FromCopiedString (absl::string_view s)
 
static Slice FromCopiedString (const char *s)
 
static Slice FromCopiedString (std::string s)
 
static Slice FromInt64 (int64_t i)
 
- Static Public Member Functions inherited from grpc_core::slice_detail::StaticConstructors< Slice >
static Slice FromStaticBuffer (const void *s, size_t len)
 
static Slice FromStaticString (absl::string_view s)
 
static Slice FromStaticString (const char *s)
 

Additional Inherited Members

- Protected Member Functions inherited from grpc_core::slice_detail::BaseSlice
 BaseSlice ()
 
 BaseSlice (const grpc_slice &slice)
 
grpc_slicec_slice_ptr ()
 
uint8_tmutable_data ()
 
void SetCSlice (const grpc_slice &slice)
 
void Swap (BaseSlice *other)
 
 ~BaseSlice ()=default
 

Detailed Description

Definition at line 282 of file src/core/lib/slice/slice.h.

Constructor & Destructor Documentation

◆ Slice() [1/5]

grpc_core::Slice::Slice ( )
default

◆ ~Slice()

grpc_core::Slice::~Slice ( )
inline

Definition at line 287 of file src/core/lib/slice/slice.h.

◆ Slice() [2/5]

grpc_core::Slice::Slice ( const grpc_slice slice)
inlineexplicit

Definition at line 288 of file src/core/lib/slice/slice.h.

◆ Slice() [3/5]

grpc_core::Slice::Slice ( slice_detail::BaseSlice &&  other)
inlineexplicit

Definition at line 289 of file src/core/lib/slice/slice.h.

◆ Slice() [4/5]

grpc_core::Slice::Slice ( const Slice )
delete

◆ Slice() [5/5]

grpc_core::Slice::Slice ( Slice &&  other)
inlinenoexcept

Definition at line 294 of file src/core/lib/slice/slice.h.

Member Function Documentation

◆ AsOwned()

Slice grpc_core::Slice::AsOwned ( ) const
inline

Definition at line 322 of file src/core/lib/slice/slice.h.

◆ Copy()

Slice grpc_core::Slice::Copy ( ) const
inline

Definition at line 370 of file src/core/lib/slice/slice.h.

◆ FromExternalString()

static Slice grpc_core::Slice::FromExternalString ( absl::string_view  str)
inlinestatic

Definition at line 382 of file src/core/lib/slice/slice.h.

◆ FromRefcountAndBytes()

static Slice grpc_core::Slice::FromRefcountAndBytes ( grpc_slice_refcount r,
const uint8_t begin,
const uint8_t end 
)
inlinestatic

Definition at line 372 of file src/core/lib/slice/slice.h.

◆ operator=() [1/2]

Slice& grpc_core::Slice::operator= ( const Slice )
delete

◆ operator=() [2/2]

Slice& grpc_core::Slice::operator= ( Slice &&  other)
inlinenoexcept

Definition at line 295 of file src/core/lib/slice/slice.h.

◆ Ref()

Slice grpc_core::Slice::Ref ( ) const
inline

Definition at line 368 of file src/core/lib/slice/slice.h.

◆ RefSubSlice()

Slice grpc_core::Slice::RefSubSlice ( size_t  pos,
size_t  n 
) const
inline

Definition at line 358 of file src/core/lib/slice/slice.h.

◆ Split()

Slice grpc_core::Slice::Split ( size_t  split)
inline

Definition at line 364 of file src/core/lib/slice/slice.h.

◆ TakeMutable()

MutableSlice grpc_core::Slice::TakeMutable ( )
inline

Definition at line 340 of file src/core/lib/slice/slice.h.

◆ TakeOwned()

Slice grpc_core::Slice::TakeOwned ( )
inline

Definition at line 310 of file src/core/lib/slice/slice.h.

◆ TakeSubSlice()

Slice grpc_core::Slice::TakeSubSlice ( size_t  pos,
size_t  n 
)
inline

Definition at line 353 of file src/core/lib/slice/slice.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:37