Enum php_literal_parser::Key [−][src]
Variants
Int(i64)
String(String)
Implementations
impl Key
[src]
impl Key
[src]pub fn is_int(&self) -> bool
[src]
Check if the key is an integer
pub fn is_string(&self) -> bool
[src]
Check if the key is a string
pub fn into_int(self) -> Option<i64>
[src]
Convert the key into a bool if it is one
pub fn into_string(self) -> Option<String>
[src]
Convert the key into a string if it is one
pub fn as_str(&self) -> Option<&str>
[src]
Get the key as &str if it is a string
pub fn as_int(&self) -> Option<i64>
[src]
Get the key as i64 if it is an int
Trait Implementations
impl<'de> Deserialize<'de> for Key
[src]
impl<'de> Deserialize<'de> for Key
[src]fn deserialize<D>(deserializer: D) -> Result<Key, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl PartialOrd<Key> for Key
[src]
impl PartialOrd<Key> for Key
[src]impl StructuralEq for Key
[src]
impl StructuralEq for Key
[src]Auto Trait Implementations
impl RefUnwindSafe for Key
impl RefUnwindSafe for Key
impl UnwindSafe for Key
impl UnwindSafe for Key