fml 0.6.10

Friendly Markup Language
Documentation
use crate::ast::{Content, FmlList, FmlValue, FmlValues, ListItem, Section};

impl From<FmlValue> for FmlValues {
    fn from(value: FmlValue) -> Self {
        vec![value].into()
    }
}

impl From<Vec<FmlValue>> for FmlValues {
    fn from(values: Vec<FmlValue>) -> Self {
        Self(values)
    }
}

impl From<FmlValues> for Vec<FmlValue> {
    fn from(values: FmlValues) -> Self {
        values.0
    }
}

impl From<Section> for Vec<Section> {
    fn from(section: Section) -> Self {
        vec![section]
    }
}

impl From<Section> for Content {
    fn from(section: Section) -> Self {
        Content(vec![section])
    }
}

impl From<Vec<ListItem>> for FmlList {
    fn from(vec: Vec<ListItem>) -> Self {
        FmlList(vec)
    }
}