Struct simplicity_sys::c_jets::frame_ffi::CFrameItem
source · #[repr(C)]pub struct CFrameItem {
pub edge: *const c_uchar,
pub len: size_t,
}
Expand description
FrameItem for C FFI. This type is only used to pass data to the C FFI.
Fields§
§edge: *const c_uchar
§len: size_t
Implementations§
source§impl CFrameItem
impl CFrameItem
sourcepub unsafe fn new_read(n: usize, from: *const usize) -> Self
pub unsafe fn new_read(n: usize, from: *const usize) -> Self
Initialize a new read frame. ‘n’ is the number of cells for the read frame. ‘from’ is a pointer to the beginning of the new slice for the array of u8 to hold the frame’s cells.
Note: The C implementation uses array of UWORD for from
. UWORD maps to uint_fast16_t which
maps to usize on both 32-bit and 64-bit platforms.
§Safety
from
must be a valid pointer to a contiguous allocation of at least n
usizes.
sourcepub unsafe fn new_write(n: usize, from: *mut usize) -> Self
pub unsafe fn new_write(n: usize, from: *mut usize) -> Self
Initialize a new write frame. ‘n’ is the number of cells for the write frame. ‘from’ is a pointer to the one-past-the-end of the new slice for the array of UWORDS to hold the frame’s cells.
§Safety
from
must be a valid pointer one past the end of a contiguous allocation
of at least n
usizes.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CFrameItem
impl !Send for CFrameItem
impl !Sync for CFrameItem
impl Unpin for CFrameItem
impl UnwindSafe for CFrameItem
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