/// Returns the `String` representation of this value or `None` if is not a string literal.
Returns the `String` representation of this value or `None` if is not a string literal.
Returns the ` String ` representation of this value or ` None ` if is not a string literal .
pub fn to_string_literal(&self) -> Option<String> {
        if let Value::Literal(lit) = self {
            return match lit {
                Lit::Str(x) => Some(x.value()),
                Lit::ByteStr(x) => unsafe { Some(String::from_utf8_unchecked(x.value())) },
                _ => None,
            };
        }
        None
    }
pub fn to_string_literal ( & self ) -> Option < String > { if let Value :: Literal ( lit ) = self { return match lit { Lit :: Str ( x ) => Some ( x . value ( ) ) , Lit :: ByteStr ( x ) => unsafe { Some ( String :: from_utf8_unchecked ( x . value ( ) ) ) } , _ => None , } ; } None }
Returns the `String` representation of this value or `None` if is not a string literal.
Returns the ` String ` representation of this value or ` None ` if is not a string literal .
&self