pub enum FfiType {
}Expand description
FFI-compatible types.
Represents types that can be marshalled across FFI boundaries.
Variants§
Bool
Boolean type (maps to C bool or Rust bool).
UInt8
8-bit unsigned integer.
UInt16
16-bit unsigned integer.
UInt32
32-bit unsigned integer.
UInt64
64-bit unsigned integer.
Int8
8-bit signed integer.
Int16
16-bit signed integer.
Int32
32-bit signed integer.
Int64
64-bit signed integer.
Float32
32-bit floating point.
Float64
64-bit floating point.
String
String (null-terminated in C).
ByteArray
Byte array.
Unit
Unit type (void).
Ptr(Box<FfiType>)
Pointer to another type.
Fn(Vec<FfiType>, Box<FfiType>)
Function pointer.
OxiLean(String)
OxiLean-specific opaque type.
Implementations§
Source§impl FfiType
impl FfiType
Sourcepub fn is_ffi_safe(&self) -> bool
pub fn is_ffi_safe(&self) -> bool
Check if this type can be safely passed across FFI boundaries.
Sourcepub fn size_bytes(&self) -> Option<usize>
pub fn size_bytes(&self) -> Option<usize>
Get the size in bytes of this type (if known).
Trait Implementations§
impl Eq for FfiType
impl StructuralPartialEq for FfiType
Auto Trait Implementations§
impl Freeze for FfiType
impl RefUnwindSafe for FfiType
impl Send for FfiType
impl Sync for FfiType
impl Unpin for FfiType
impl UnsafeUnpin for FfiType
impl UnwindSafe for FfiType
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