Struct dart_sys::Dart_CObject_Type
source · #[repr(transparent)]pub struct Dart_CObject_Type(pub c_int);
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_HandleFinalizer callback; a non-NULL callback must be provided.
Note that Dart_CObject_kNativePointer is intended for internal use by dart:io implementation and has no connection to dart:ffi Pointer class. It represents a pointer to a native resource of a known type. The receiving side will only see this pointer as an integer and will not see the specified finalizer. The specified finalizer will only be invoked if the message is not delivered.
Tuple Fields§
§0: c_int
Trait Implementations§
source§impl Clone for Dart_CObject_Type
impl Clone for Dart_CObject_Type
source§fn clone(&self) -> Dart_CObject_Type
fn clone(&self) -> Dart_CObject_Type
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Dart_CObject_Type
impl Debug for Dart_CObject_Type
source§impl Hash for Dart_CObject_Type
impl Hash for Dart_CObject_Type
source§impl PartialEq for Dart_CObject_Type
impl PartialEq for Dart_CObject_Type
source§fn eq(&self, other: &Dart_CObject_Type) -> bool
fn eq(&self, other: &Dart_CObject_Type) -> bool
self
and other
values to be equal, and is used
by ==
.