#[repr(C)]pub struct CVec { /* private fields */ }
Expand description
A struct to facilitate transferring a Vec<u8>
across FFI boundaries.
Implementations§
Source§impl CVec
impl CVec
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8]
pub fn as_mut_slice(&mut self) -> &mut [u8]
Returns a mutable slice of the contained data.
§Safety
The caller must ensure that the data pointed to by self.data
remains valid for the duration of the returned slice.
Fills a buffer allocated in Rust from C.
§Safety
Constructs a CVec
without taking ownership of the pointed buffer. If the owner drops the
buffer, the CVec
will point to invalid memory.
Trait Implementations§
impl Copy for CVec
Auto Trait Implementations§
impl Freeze for CVec
impl RefUnwindSafe for CVec
impl !Send for CVec
impl !Sync for CVec
impl Unpin for CVec
impl UnwindSafe for CVec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more