pub enum RestorationData {
Null,
Bool(bool),
Int(i64),
Double(f64),
String(String),
Uint8List(Vec<u8>),
Int32List(Vec<i32>),
Int64List(Vec<i64>),
Float64List(Vec<f64>),
List(Vec<RestorationData>),
Map(IndexMap<RestorationData, RestorationData>),
}Expand description
One value in the restoration data, of the kinds StandardMessageCodec can carry.
Double compares and hashes by IEEE equality, so 0.0 and -0.0 are
one key and a NaN key can never be looked up again — as in Dart.
Variants§
Null
Dart’s null.
Bool(bool)
Dart’s bool.
Int(i64)
Dart’s int.
Double(f64)
Dart’s double.
String(String)
Dart’s String.
Uint8List(Vec<u8>)
Dart’s Uint8List.
Int32List(Vec<i32>)
Dart’s Int32List.
Int64List(Vec<i64>)
Dart’s Int64List.
Float64List(Vec<f64>)
Dart’s Float64List.
List(Vec<RestorationData>)
Dart’s List<Object?>.
Map(IndexMap<RestorationData, RestorationData>)
Dart’s Map<Object?, Object?>.
Implementations§
Source§impl RestorationData
impl RestorationData
Sourcepub fn as_uint8_list(&self) -> Option<&[u8]>
pub fn as_uint8_list(&self) -> Option<&[u8]>
The Uint8List, or None for another kind.
Sourcepub fn as_int32_list(&self) -> Option<&[i32]>
pub fn as_int32_list(&self) -> Option<&[i32]>
The Int32List, or None for another kind.
Sourcepub fn as_int64_list(&self) -> Option<&[i64]>
pub fn as_int64_list(&self) -> Option<&[i64]>
The Int64List, or None for another kind.
Sourcepub fn as_float64_list(&self) -> Option<&[f64]>
pub fn as_float64_list(&self) -> Option<&[f64]>
The Float64List, or None for another kind.
Sourcepub fn as_list(&self) -> Option<&[RestorationData]>
pub fn as_list(&self) -> Option<&[RestorationData]>
The list, or None for another kind.
Sourcepub fn as_map(&self) -> Option<&IndexMap<RestorationData, RestorationData>>
pub fn as_map(&self) -> Option<&IndexMap<RestorationData, RestorationData>>
The map, or None for another kind.
Sourcepub fn as_map_mut(
&mut self,
) -> Option<&mut IndexMap<RestorationData, RestorationData>>
pub fn as_map_mut( &mut self, ) -> Option<&mut IndexMap<RestorationData, RestorationData>>
The map to write into, or None for another kind.
Sourcepub fn into_map(self) -> Option<IndexMap<RestorationData, RestorationData>>
pub fn into_map(self) -> Option<IndexMap<RestorationData, RestorationData>>
Takes the map out, or None for another kind.
Trait Implementations§
Source§impl Clone for RestorationData
impl Clone for RestorationData
Source§fn clone(&self) -> RestorationData
fn clone(&self) -> RestorationData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RestorationData
impl Debug for RestorationData
Source§impl Default for RestorationData
impl Default for RestorationData
Source§fn default() -> RestorationData
fn default() -> RestorationData
Returns the “default value” for a type. Read more
impl Eq for RestorationData
Source§impl From<&str> for RestorationData
impl From<&str> for RestorationData
Source§fn from(value: &str) -> RestorationData
fn from(value: &str) -> RestorationData
Converts to this type from the input type.
Source§impl From<IndexMap<RestorationData, RestorationData>> for RestorationData
impl From<IndexMap<RestorationData, RestorationData>> for RestorationData
Source§fn from(map: IndexMap<RestorationData, RestorationData>) -> RestorationData
fn from(map: IndexMap<RestorationData, RestorationData>) -> RestorationData
Converts to this type from the input type.
Source§impl<T> From<Option<T>> for RestorationDatawhere
T: Into<RestorationData>,
impl<T> From<Option<T>> for RestorationDatawhere
T: Into<RestorationData>,
Source§fn from(value: Option<T>) -> RestorationData
fn from(value: Option<T>) -> RestorationData
Converts to this type from the input type.
Source§impl From<String> for RestorationData
impl From<String> for RestorationData
Source§fn from(value: String) -> RestorationData
fn from(value: String) -> RestorationData
Converts to this type from the input type.
Source§impl From<Vec<RestorationData>> for RestorationData
impl From<Vec<RestorationData>> for RestorationData
Source§fn from(values: Vec<RestorationData>) -> RestorationData
fn from(values: Vec<RestorationData>) -> RestorationData
Converts to this type from the input type.
Source§impl From<bool> for RestorationData
impl From<bool> for RestorationData
Source§fn from(value: bool) -> RestorationData
fn from(value: bool) -> RestorationData
Converts to this type from the input type.
Source§impl From<f64> for RestorationData
impl From<f64> for RestorationData
Source§fn from(value: f64) -> RestorationData
fn from(value: f64) -> RestorationData
Converts to this type from the input type.
Source§impl From<i64> for RestorationData
impl From<i64> for RestorationData
Source§fn from(value: i64) -> RestorationData
fn from(value: i64) -> RestorationData
Converts to this type from the input type.
Source§impl Hash for RestorationData
impl Hash for RestorationData
Source§impl PartialEq for RestorationData
impl PartialEq for RestorationData
impl StructuralPartialEq for RestorationData
Auto Trait Implementations§
impl Freeze for RestorationData
impl RefUnwindSafe for RestorationData
impl Send for RestorationData
impl Sync for RestorationData
impl Unpin for RestorationData
impl UnsafeUnpin for RestorationData
impl UnwindSafe for RestorationData
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.