pub enum Value {
Show 18 variants
Null,
Bool(bool),
I64(i64),
F64(f64),
String(String),
I8List(Vec<i8>),
U8List(Vec<u8>),
I16List(Vec<i16>),
U16List(Vec<u16>),
I32List(Vec<i32>),
U32List(Vec<u32>),
I64List(Vec<i64>),
F32List(Vec<f32>),
F64List(Vec<f64>),
List(Vec<Value>),
Map(ValueTupleList),
Dart(DartObject),
FinalizableHandle(Arc<FinalizableHandle>),
}
Variants§
Null
Bool(bool)
I64(i64)
F64(f64)
String(String)
I8List(Vec<i8>)
U8List(Vec<u8>)
I16List(Vec<i16>)
U16List(Vec<u16>)
I32List(Vec<i32>)
U32List(Vec<u32>)
I64List(Vec<i64>)
F32List(Vec<f32>)
F64List(Vec<f64>)
List(Vec<Value>)
Map(ValueTupleList)
Dart(DartObject)
Special Dart objects. These can only be sent from Rust to Dart
FinalizableHandle(Arc<FinalizableHandle>)
Can only be send from Rust to Dart. On Dart side this will be a
FinalizableHandle
instance. When handle gets garbage collected, the
finalizer closure that FinalizableHandle
was created with will be invoked.
You can send single FinalizableHandle
instance to Dart more than once
and it will always result in the same Dart object.
If the FinalizableHandle
has already finalized it will be received as null
.
Trait Implementations§
Source§impl From<DartObject> for Value
impl From<DartObject> for Value
Source§fn from(v: DartObject) -> Value
fn from(v: DartObject) -> Value
Converts to this type from the input type.
Source§impl PartialOrd for Value
impl PartialOrd for Value
Source§impl TryFrom<Value> for DartObject
impl TryFrom<Value> for DartObject
Source§impl<K: TryFrom<Value, Error = E1> + Eq + Hash, V: TryFrom<Value, Error = E2>, E1: Into<TryFromError>, E2: Into<TryFromError>> TryFrom<Value> for HashMap<K, V>
impl<K: TryFrom<Value, Error = E1> + Eq + Hash, V: TryFrom<Value, Error = E2>, E1: Into<TryFromError>, E2: Into<TryFromError>> TryFrom<Value> for HashMap<K, V>
Source§impl TryFrom<Value> for ValueTupleList
impl TryFrom<Value> for ValueTupleList
Source§impl<V: TryFrom<Value, Error = E> + 'static, E: Into<TryFromError>> TryFrom<Value> for Vec<V>
impl<V: TryFrom<Value, Error = E> + 'static, E: Into<TryFromError>> TryFrom<Value> for Vec<V>
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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