servicepoint-binding-c/crates/servicepoint_binding_c/src/c_slice.rs
2024-05-26 13:15:11 +02:00

11 lines
288 B
Rust

#[repr(C)]
/// Represents a span of memory (`&mut [u8]` ) as a struct usable by C code.
///
/// Usage of this type is inherently unsafe.
pub struct CByteSlice {
/// The start address of the memory
pub start: *mut u8,
/// The amount of memory in bytes
pub length: usize,
}