#[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

source

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.

source

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§

source§

impl Debug for CFrameItem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.