hugo_to_json 0.3.9

A library and command line tool for producing a JSON representation of a Hugo site.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::operation_result::OperationResult;
use crate::page_index::PageIndex;

pub struct TraverseResults {
    pub page_index: Vec<PageIndex>,
    pub error_count: usize,
    pub errors: Vec<OperationResult>,
}

impl TraverseResults {
    pub fn new(page_index: Vec<PageIndex>, errors: Vec<OperationResult>) -> Self {
        Self {
            page_index,
            error_count: errors.len(),
            errors,
        }
    }
}