pub fn to_string(
front_matter: &Frontmatter,
format: Format,
) -> Result<String, Error>
Expand description
Converts a Frontmatter
object to a string representation in the specified format.
§Arguments
front_matter
- Reference to theFrontmatter
object to serialise.format
- The target format for serialisation.
§Returns
A Result
containing the serialised string or a Error
.
§Errors
Returns Error
if:
- Serialisation fails.
- The specified format is unsupported.