Enum uniffi_bindgen::interface::ffi::FfiType
source · pub enum FfiType {
}
Variants§
UInt8
Int8
UInt16
Int16
UInt32
Int32
UInt64
Int64
Float32
Float64
RustArcPtr(String)
A *const c_void
pointer to a rust-owned Arc<T>
.
If you’ve got one of these, you must call the appropriate rust function to free it.
The templates will generate a unique free
function for each T.
The inner string references the name of the T
type.
RustBuffer(Option<String>)
A byte buffer allocated by rust, and owned by whoever currently holds it. If you’ve got one of these, you must either call the appropriate rust function to free it or pass it to someone that will. If the inner option is Some, it is the name of the external type. The bindings may need to use this name to import the correct RustBuffer for that type.
ForeignBytes
A borrowed reference to some raw bytes owned by foreign language code. The provider of this reference must keep it alive for the duration of the receiving call.
Callback(String)
Pointer to a callback function. The inner value which matches one of the callback definitions in crate::ComponentInterface::ffi_definitions.
Struct(String)
Pointer to a FFI struct (e.g. a VTable). The inner value matches one of the struct definitions in crate::ComponentInterface::ffi_definitions.
Handle
Opaque 64-bit handle
These are used to pass objects across the FFI.
RustCallStatus
Reference(Box<FfiType>)
Pointer to an FfiType.
VoidPointer
Opaque pointer
Implementations§
Trait Implementations§
source§impl From<&Type> for FfiType
impl From<&Type> for FfiType
When passing data across the FFI, each Type
value will be lowered into a corresponding
FfiType
value. This conversion tells you which one.
Note that the conversion is one-way - given an FfiType, it is not in general possible to tell what the corresponding Type is that it’s being used to represent.
source§impl Ord for FfiType
impl Ord for FfiType
source§impl PartialEq for FfiType
impl PartialEq for FfiType
source§impl PartialOrd for FfiType
impl PartialOrd for FfiType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more