wobsite.FrontMatterError
type pub enum FrontMatterError
An error that may be produced when parsing JSON front matter.
Constructors
InvalidJson
InvalidJson(String)
The JSON syntax is invalid.
InvalidKey
InvalidKey(String)
A required key is missing or invalid.
Instance methods
to_string
Show source codeHide source code
fn pub to_string -> String {
match self {
case InvalidJson(v) -> 'the JSON front matter is invalid: ${v}'
case InvalidKey(v) -> "the key '${v}' is missing or invalid"
}
}
fn pub to_string -> String
Converts self
to a String
.
Implemented traits
ToString
impl ToString for FrontMatterError