[][src]Struct grpcio_sys::grpc_slice

#[repr(C)]
pub struct grpc_slice {
    pub refcount: *mut grpc_slice_refcount,
    pub data: grpc_slice_grpc_slice_data,
}

A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].

It can have an associated ref count which has a destruction routine to be run when the ref count reaches zero (see grpc_slice_new() and grp_slice_unref()). Multiple grpc_slice values may share a ref count.

If the slice does not have a refcount, it represents an inlined small piece of data that is copied by value.

Fields

refcount: *mut grpc_slice_refcountdata: grpc_slice_grpc_slice_data

Methods

impl grpc_slice[src]

pub fn with_capacity(len: usize) -> Self[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn range_from(&self, offset: usize) -> &[u8][src]

Trait Implementations

impl Clone for grpc_slice[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for grpc_slice[src]

impl<'a> From<&'a [u8]> for grpc_slice[src]

impl Drop for grpc_slice[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]