Enum Key
#[non_exhaustive]
pub enum Key<'a>
The key of anything looking like a hashmap (struct/hashmaps)
Variants
-
Bool(bool) -
U64(u64) -
I64(i64) -
U128(u128) -
I128(i128) -
String(Arc<str>) -
Str(&'a str)
Implementations
impl<'a> Key<'a>
fn as_str(&self) -> Option<&str>Returns the content if the key is a string
fn as_value(&self) -> Value
Trait Implementations
impl From<&'static str> for Key<'static>
fn from(value: &'static str) -> Self
impl From<String> for Key<'static>
fn from(value: String) -> Self
impl From<i128> for Key<'static>
fn from(value: i128) -> Self
impl From<u128> for Key<'static>
fn from(value: u128) -> Self
impl<'a> Clone for Key<'a>
fn clone(&self) -> Self
impl<'a> Debug for Key<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Display for Key<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Eq for Key<'a>
impl<'a> From<Cow<'a, str>> for Key<'static>
fn from(value: Cow<'a, str>) -> Self
impl<'a> Hash for Key<'a>
fn hash<H: Hasher>(&self, state: &mut H)
impl<'a> Ord for Key<'a>
fn cmp(&self, other: &Self) -> Ordering
impl<'a> PartialEq for Key<'a>
fn eq(&self, other: &Self) -> bool
impl<'a> PartialOrd for Key<'a>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
impl<'a> Serialize for Key<'a>
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer,