[core] Schema: tests first for validation and compiler determinism (red: 37+11 failing)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
//! Parsing and validation of the routes tree.
|
||||
|
||||
use crate::{Model, ValidationErrors};
|
||||
|
||||
/// One route file handed in by the caller (core does no I/O).
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct SourceFile<'a> {
|
||||
pub name: &'a str,
|
||||
pub contents: &'a str,
|
||||
}
|
||||
|
||||
/// Parse and validate the site file and every host file.
|
||||
pub fn load(site: &SourceFile<'_>, hosts: &[SourceFile<'_>]) -> Result<Model, ValidationErrors> {
|
||||
let _ = (site, hosts);
|
||||
Err(ValidationErrors(Vec::new()))
|
||||
}
|
||||
Reference in New Issue
Block a user