Enum gray_matter::Pod [−][src]
pub enum Pod { Null, String(String), Integer(i64), Float(f64), Boolean(bool), Array(Vec<Pod>), Hash(HashMap<String, Pod>), }
Expand description
A polyglot data type for representing the parsed front matter.
Any Engine
has to convert the data represented by the format into a
Pod
. This ensures we can use the parsed data similarly, regardless of the format it is parsed
from.
Variants
Tuple Fields of String
0: String
Tuple Fields of Integer
0: i64
Tuple Fields of Float
0: f64
Tuple Fields of Boolean
0: bool
Implementations
Deserialize a Pod
into any struct that implements
Deserialize
.
Note: The function coerces self
into a
serde_json::Value
in
order to work around implementing a custom Deserializer
for Pod
.
Pushes a new value into Pod::Array
.
Inserts a key value pair into or override the exist one in Pod::Hash.
Removes the value of specific key from Pod::Hash and returns it or null if not exists.
Returns length of Pod::Array and Pod::Hash, 0 as default for other types.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pod
impl UnwindSafe for Pod
Blanket Implementations
Mutably borrows from an owned value. Read more