[][src]Struct grpcio_sys::grpc_slice_refcount_vtable

#[repr(C)]
pub struct grpc_slice_refcount_vtable {
    pub ref_: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
    pub unref: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
    pub eq: Option<unsafe extern "C" fn(a: grpc_slice, b: grpc_slice) -> c_int>,
    pub hash: Option<unsafe extern "C" fn(slice: grpc_slice) -> u32>,
}

Slice API

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.

The data-structure for slices is exposed here to allow non-gpr code to build slices from whatever data they have available.

When defining interfaces that handle slices, care should be taken to define reference ownership semantics (who should call unref?) and mutability constraints (is the callee allowed to modify the slice?)

Fields

ref_: Option<unsafe extern "C" fn(arg1: *mut c_void)>unref: Option<unsafe extern "C" fn(arg1: *mut c_void)>eq: Option<unsafe extern "C" fn(a: grpc_slice, b: grpc_slice) -> c_int>hash: Option<unsafe extern "C" fn(slice: grpc_slice) -> u32>

Trait Implementations

impl Clone for grpc_slice_refcount_vtable[src]

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

Performs copy-assignment from source. Read more

impl Copy for grpc_slice_refcount_vtable[src]

impl Debug for grpc_slice_refcount_vtable[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]