[][src]Enum php_literal_parser::Key

pub enum Key {
    Int(i64),
    String(String),
}

Variants

Int(i64)
String(String)

Implementations

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

Trait Implementations

impl Borrow<str> for Key[src]

impl Clone for Key[src]

impl Debug for Key[src]

impl<'de> Deserialize<'de> for Key[src]

impl Display for Key[src]

impl Eq for Key[src]

impl<'_> From<&'_ str> for Key[src]

impl From<String> for Key[src]

impl From<i64> for Key[src]

impl Hash for Key[src]

impl Index<Key> for Value[src]

type Output = Value

The returned type after indexing.

impl PartialEq<Key> for Key[src]

impl StructuralEq for Key[src]

impl StructuralPartialEq for Key[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.