Function grpcio_sys::grpc_slice_from_copied_string
source · pub unsafe extern "C" fn grpc_slice_from_copied_string(
source: *const c_char
) -> grpc_slice
Expand description
Create a slice by copying a string. Does not preserve null terminators. Equivalent to: size_t len = strlen(source); grpc_slice slice = grpc_slice_malloc(len); memcpy(slice->data, source, len);