pub enum TypedMapKey {
Int(i64),
Bool(bool),
String(String),
}Expand description
Serializable map key types
Subset of TypedValue that can be used as map keys.
Mirrors runtime MapKey but with owned strings.
Variants§
Implementations§
Source§impl TypedMapKey
impl TypedMapKey
Sourcepub fn to_typed_value(&self) -> TypedValue
pub fn to_typed_value(&self) -> TypedValue
Convert to a TypedValue
Sourcepub fn from_runtime(key: &RuntimeMapKey) -> Self
pub fn from_runtime(key: &RuntimeMapKey) -> Self
Convert from runtime MapKey
Sourcepub fn to_runtime(&self) -> RuntimeMapKey
pub fn to_runtime(&self) -> RuntimeMapKey
Convert to runtime MapKey (requires global string allocation)
Trait Implementations§
Source§impl Clone for TypedMapKey
impl Clone for TypedMapKey
Source§fn clone(&self) -> TypedMapKey
fn clone(&self) -> TypedMapKey
Returns a duplicate of the value. Read more
1.0.0 · 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 TypedMapKey
impl Debug for TypedMapKey
Source§impl<'de> Deserialize<'de> for TypedMapKey
impl<'de> Deserialize<'de> for TypedMapKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for TypedMapKey
impl Hash for TypedMapKey
Source§impl Ord for TypedMapKey
impl Ord for TypedMapKey
Source§fn cmp(&self, other: &TypedMapKey) -> Ordering
fn cmp(&self, other: &TypedMapKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TypedMapKey
impl PartialEq for TypedMapKey
Source§impl PartialOrd for TypedMapKey
impl PartialOrd for TypedMapKey
Source§impl Serialize for TypedMapKey
impl Serialize for TypedMapKey
impl Eq for TypedMapKey
impl StructuralPartialEq for TypedMapKey
Auto Trait Implementations§
impl Freeze for TypedMapKey
impl RefUnwindSafe for TypedMapKey
impl Send for TypedMapKey
impl Sync for TypedMapKey
impl Unpin for TypedMapKey
impl UnwindSafe for TypedMapKey
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