syncat-stylesheet 3.6.0

Parser for Syncat Stylesheets.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::path::Path;

pub trait Resolver {
    type Error: std::error::Error + Sync + Send + 'static;

    fn read_to_string<P: AsRef<Path>>(&self, path: P) -> Result<String, Self::Error>;
}

pub struct FsResolver;

impl Resolver for FsResolver {
    type Error = std::io::Error;

    fn read_to_string<P: AsRef<Path>>(&self, path: P) -> Result<String, Self::Error> {
        std::fs::read_to_string(path)
    }
}