Enum flutter_rust_bridge::ffi::io::ffi::DartCObjectType
source · #[repr(i32)]pub enum DartCObjectType {
Show 14 variants
DartNull = 0,
DartBool = 1,
DartInt32 = 2,
DartInt64 = 3,
DartDouble = 4,
DartString = 5,
DartArray = 6,
DartTypedData = 7,
DartExternalTypedData = 8,
DartSendPort = 9,
DartCapability = 10,
DartNativePointer = 11,
DartUnsupported = 12,
DartNumberOfTypes = 13,
}
Expand description
A Dart_CObject is used for representing Dart objects as native C data outside the Dart heap. These objects are totally detached from the Dart heap. Only a subset of the Dart objects have a representation as a Dart_CObject.
The string encoding in the ‘value.as_string’ is UTF-8.
All the different types from dart:typed_data are exposed as type kTypedData. The specific type from dart:typed_data is in the type field of the as_typed_data structure. The length in the as_typed_data structure is always in bytes.
The data for kTypedData is copied on message send and ownership remains with the caller. The ownership of data for kExternalTyped is passed to the VM on message send and returned when the VM invokes the Dart_WeakPersistentHandleFinalizer callback; a non-NULL callback must be provided.
https://github.com/dart-lang/sdk/blob/main/runtime/include/dart_native_api.h
Variants§
DartNull = 0
DartBool = 1
DartInt32 = 2
DartInt64 = 3
DartDouble = 4
DartString = 5
DartArray = 6
DartTypedData = 7
DartExternalTypedData = 8
DartSendPort = 9
DartCapability = 10
DartNativePointer = 11
DartUnsupported = 12
DartNumberOfTypes = 13
Trait Implementations§
source§impl Clone for DartCObjectType
impl Clone for DartCObjectType
source§fn clone(&self) -> DartCObjectType
fn clone(&self) -> DartCObjectType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DartCObjectType
impl Debug for DartCObjectType
source§impl PartialEq for DartCObjectType
impl PartialEq for DartCObjectType
source§fn eq(&self, other: &DartCObjectType) -> bool
fn eq(&self, other: &DartCObjectType) -> bool
self
and other
values to be equal, and is used
by ==
.