fn properties_table<'ev>(
        properties: &'ev [Property],
        resolver: &'ev Resolver,
    ) -> Vec<Event<'ev>> {
        let mut events = vec![
            Event::Start(Tag::Heading(2)),
            Event::Text(CowStr::Borrowed("Properties")),
            Event::End(Tag::Heading(2)),
            Event::Start(Tag::Table(vec![Alignment::Left, Alignment::Left])),
            Event::Start(Tag::TableHead),
            Event::Start(Tag::TableCell),
            Event::Text(CowStr::Borrowed("type")),
            Event::End(Tag::TableCell),
            Event::Start(Tag::TableCell),
            Event::Text(CowStr::Borrowed("property")),
            Event::End(Tag::TableCell),
            Event::End(Tag::TableHead),
        ];

        for property in properties {
            let link = Tag::Link(
                LinkType::Reference,
                format!("#property-{}", property.name).into(),
                property.name.as_str().into(),
            );
            events.push(Event::Start(Tag::TableRow));
            events.push(Event::Start(Tag::TableCell));
            events.extend(resolver.encode_type(&property.typ));
            events.extend(vec![
                Event::End(Tag::TableCell),
                Event::Start(Tag::TableCell),
                Event::Start(link.clone()),
                Event::Text(CowStr::Borrowed(property.name.as_str())),
                Event::End(link),
                Event::End(Tag::TableCell),
                Event::End(Tag::TableRow),
            ]);
        }

        events.push(Event::End(Tag::Table(vec![
            Alignment::Left,
            Alignment::Left,
        ])));

        events
    }
/// Create a table summarizing the properties.
Create a table summarizing the properties.
Create a table summarizing the properties .
fn properties_table<'ev>(
        properties: &'ev [Property],
        resolver: &'ev Resolver,
    ) -> Vec<Event<'ev>> {
        let mut events = vec![
            Event::Start(Tag::Heading(2)),
            Event::Text(CowStr::Borrowed("Properties")),
            Event::End(Tag::Heading(2)),
            Event::Start(Tag::Table(vec![Alignment::Left, Alignment::Left])),
            Event::Start(Tag::TableHead),
            Event::Start(Tag::TableCell),
            Event::Text(CowStr::Borrowed("type")),
            Event::End(Tag::TableCell),
            Event::Start(Tag::TableCell),
            Event::Text(CowStr::Borrowed("property")),
            Event::End(Tag::TableCell),
            Event::End(Tag::TableHead),
        ];
        for property in properties {
            let link = Tag::Link(
                LinkType::Reference,
                format!("#property-{}", property.name).into(),
                property.name.as_str().into(),
            );
            events.push(Event::Start(Tag::TableRow));
            events.push(Event::Start(Tag::TableCell));
            events.extend(resolver.encode_type(&property.typ));
            events.extend(vec![
                Event::End(Tag::TableCell),
                Event::Start(Tag::TableCell),
                Event::Start(link.clone()),
                Event::Text(CowStr::Borrowed(property.name.as_str())),
                Event::End(link),
                Event::End(Tag::TableCell),
                Event::End(Tag::TableRow),
            ]);
        }
        events.push(Event::End(Tag::Table(vec![
            Alignment::Left,
            Alignment::Left,
        ])));
        events
    }
fn properties_table < ' ev > ( properties : & ' ev [ Property ] , resolver : & ' ev Resolver , ) -> Vec < Event < ' ev > > { let mut events = vec ! [ Event Start ( Tag Heading ( 2 ) ) Event Text ( CowStr Borrowed ( " " ) ) Event End ( Tag Heading ( 2 ) ) Event Start ( Tag Table ( vec [ Alignment Left Alignment Left ] ) ) Event Start ( Tag TableHead ) Event Start ( Tag TableCell ) Event Text ( CowStr Borrowed ( " " ) ) Event End ( Tag TableCell ) Event Start ( Tag TableCell ) Event Text ( CowStr Borrowed ( " " ) ) Event End ( Tag TableCell ) Event End ( Tag TableHead ) ] ; for property in properties { let link = Tag :: Link ( LinkType :: Reference , format ! ( " " property name ) . into ( ) , property . name . as_str ( ) . into ( ) , ) ; events . push ( Event :: Start ( Tag :: TableRow ) ) ; events . push ( Event :: Start ( Tag :: TableCell ) ) ; events . extend ( resolver . encode_type ( & property . typ ) ) ; events . extend ( vec ! [ Event End ( Tag TableCell ) Event Start ( Tag TableCell ) Event Start ( link clone ( ) ) Event Text ( CowStr Borrowed ( property name as_str ( ) ) ) Event End ( link ) Event End ( Tag TableCell ) Event End ( Tag TableRow ) ] ) ; } events . push ( Event :: End ( Tag :: Table ( vec ! [ Alignment Left Alignment Left ] ) ) ) ; events }
Create a table summarizing the properties.
Create a table summarizing the properties .
properties
&'ev [Property]
resolver
&'ev Resolver
properties
&'ev [Property]
resolver
&'ev Resolver