Struct grpcio_sys::grpc_slice
source · [−]#[repr(C)]pub struct grpc_slice {
pub refcount: *mut grpc_slice_refcount,
pub data: grpc_slice_grpc_slice_data,
}
Expand description
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_refcount
data: grpc_slice_grpc_slice_data
Trait Implementations
sourceimpl Clone for grpc_slice
impl Clone for grpc_slice
sourcefn clone(&self) -> grpc_slice
fn clone(&self) -> grpc_slice
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for grpc_slice
impl Debug for grpc_slice
impl Copy for grpc_slice
Auto Trait Implementations
impl RefUnwindSafe for grpc_slice
impl !Send for grpc_slice
impl !Sync for grpc_slice
impl Unpin for grpc_slice
impl UnwindSafe for grpc_slice
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more