Struct deno_libffi::middle::Type [−][src]
pub struct Type(_);
Expand description
Represents a single C type.
Example
Suppose we have a C struct:
struct my_struct { uint16_t f1; uint64_t f2; };
To pass the struct by value via libffi, we need to construct a
Type
object describing its layout:
use deno_libffi::middle::Type; let my_struct = Type::structure(vec![ Type::u64(), Type::u16(), ]);
Implementations
Returns the representation of the C void
type.
This is used only for the return type of a CIF, not for an argument or struct member.
Returns the C longlong
type.
Returns the C unsigned longlong
type.
Returns the C long double
(extended-precision floating point) type.
pub fn structure<I>(fields: I) -> Self where
I: IntoIterator<Item = Type>,
I::IntoIter: ExactSizeIterator<Item = Type>,
pub fn structure<I>(fields: I) -> Self where
I: IntoIterator<Item = Type>,
I::IntoIter: ExactSizeIterator<Item = Type>,
Constructs a structure type whose fields have the given types.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Type
impl UnwindSafe for Type
Blanket Implementations
Mutably borrows from an owned value. Read more